SMTP sending

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Hi all

I have a problem...i am sending emails using SmtpMail in .NET. now it gives
me the following error "Could not access 'CDO.Message' object.", BUT it
still sends the email to the recipient!!

here is my code.

mailMess = new MailMessage();
mailMess.To = strRecipients;
mailMess.From = strFrom;
mailMess.Subject = strSubject;
mailMess.Body = strMessage;
mailMess.BodyFormat = MailFormat.Html;
if (htAttachments != null) {
foreach (DictionaryEntry entry in htAttachments) {
MailAttachment attachmentObj = null;

attachmentObj = new MailAttachment(entry.Value.ToString());
mailMess.Attachments.Add(attachmentObj);
}
}
SmtpMail.SmtpServer = strSMTPServer;
SmtpMail.Send(mailMess);


this code is running in a windows service also coded in .NET

any suggestions?

Thanks
Jason
 
Back
Top