I am writing a simple email helper class that will be called by a Windows service. When I test though the email attachment is not sending with the rest of the email.
mailAttachmentFilePath is an ArrayList (just for clarification) and mail represents MailMessage class.
if (mailAttachmentFilePath.Count > 0)
{
foreach (string file in mailAttachmentFilePath)
{
Attachment data = new Attachment(file);
mail.Attachments.Add(data);
data.Dispose();
}
}
I am certain I am missing something but, I don't know what it is...