title: c# generated csv file sent via email embedded to bottom of email in lotus note
body: <p>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?</p>
  
  <p>Code is as below:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Thanks.</p>