Does any one know why I get the error :"Could not access 'CDO.Message' object." and how can I resolve it! The error is raised on the line "SmtpMail.Send(mail);" in the following code....
I suspect it is a security issue or permission issue with my IIS web server.
try
{
MailMessage mail = new MailMessage();
mail.To = tabManageReviews_txtEmailText.Text;
mail.From = "
[email protected]
mail.Subject = tabManageReviews_cmboEmail.Text;
mail.BodyFormat = MailFormat.Html;
mail.Body = tabManageReviews_txtEmailText.Text;
SmtpMail.SmtpServer = "smtp.earthlink.net";
SmtpMail.Send(mail);
MessageBox.Show("Mail has been sent.", "It's Official",
MessageBoxButtons.OK, MessageBoxIcon.Information);
tabManageReviews_TreeView.SelectedNode =
tabManageReviews_TreeView.Nodes[0];
}
catch (Exception ex)
{
MessageBox.Show("There was an error delivering your mail." +
" The specific error message was \n\n:" + ex.Message,
"Mail Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
Cmarek