asp.net-mail

Mvc .Net.Mail: How to send email with image (logo)

╄→гoц情女王★ 提交于 2019-12-12 03:26:15
问题 I am using three classes to send email but i cant to combine text email with image, or just to send image. When i get email i see empty image. Help me to change my code so i can to send email with: text image and style public class SendService : IDistributionProvider { public int Send(System.Xml.Linq.XDocument recipientsData, string subject, string fromName, string fromAccount) { foreach (XElement element in recipientsData.Root.Elements()) { string email = element.Element("email").Value;

How to Set SMTP Client in POSTAL MVC not in WEB.Config

二次信任 提交于 2019-12-11 12:40:33
问题 i have a problem when using POSTAL MVC in my Project. My hosting services company requires me to set smtp client config in code not in web config. How to do that ? I hope someone can give me a solution Thank you. 回答1: I had the same problem. There is no reference on the official Postal documentation, nor an How-to. So here goes one: Create the SmtpClient instance with the custom configuration Create an Postal.EmailService instance using the constructor which takes 2 arguments

How to check if email was delivered using C# MailMessage [duplicate]

女生的网名这么多〃 提交于 2019-12-03 06:06:57
问题 This question already has answers here : How to confirm that mail has been delivered or not? (6 answers) Closed 3 years ago . I am using below code to send email it works fine most of the time & during test we found sometimes it doesn't deliver email. How can i alter this code to check the email delivery status or font any other failure. public static void SendEmail(string to, string subject, string message, bool isHtml) { try { var mail = new MailMessage(); // Set the to and from addresses.