Hi,
I need to attach a PDF file to an email. My code works when the file attachment is a .doc file, but not a .pdf file. I get an "Invalid mail attachment" error when I attach the .pdf file. ( I don't need to attach a WORD file, I just did that to see if the code would work with a diferent file type).
Both files exist so that is not the problem. Any reason why I'd get an "Invalid mail attachment" error for a PDF file and not a WORD file?
eMail = new MailMessage();
eMail.To = sTo;
if(sCC!="")
eMail.Cc = sCC;
if(sBCC!="")
eMail.Bcc = sBCC;
eMail.From = sFrom;
eMail.Subject = sSubject;
eMail ...
Go to the complete details ...