SMTP sending

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top