I am having this weired issue that CSV attachment sent via email using .NET SmtpClient appeared at the bottom of the email rather than attachment in Lotus Note. I just don’t know how to figure it out and I have no access to client computer makes debugging very hard. What are the possible steps I can take and possible gotchas I need to be aware of?
Code is as below:
var smtpClient = new SmtpClient
{
Host = ConfigurationManager.AppSettings["smtpServer"],
Port = Convert.ToInt32(ConfigurationManager.AppSettings["smtpPort"])
};
var mailMessage = new MailMessage();
mailMessage.Attachments.Add(new Attachment(attachment, contentType));
//ContentType = "text/csv";
//attachment is the temp file disk path
Thanks.