470,573 Members | 1,619 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,573 developers. It's quick & easy.

console application send email error

jam
Dear All,

I am writing a console and it send a email out when it hits error

it calls this
static void SendErrorEmail(string error)
{
System.Web.Mail.MailMessage mail = new System.Web.Mail.MailMessage();
System.Web.Mail.SmtpMail.SmtpServer = smtpServer;

mail.To = emailaddress;
mail.Subject = "error occur";
mail.From = "ab*@123.com.hk";
mail.Body = error;
System.Web.Mail.SmtpMail.Send(mail);
}
it gaves error Could Not Access CDO.Message Object

So what is the problem I am hiting??

jam

Nov 16 '05 #1
1 2983
do you have the permissions to send mail to the SMTP server?

HTH

Ollie Riches

"jam" <hk***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Dear All,

I am writing a console and it send a email out when it hits error

it calls this
static void SendErrorEmail(string error)
{
System.Web.Mail.MailMessage mail = new System.Web.Mail.MailMessage();
System.Web.Mail.SmtpMail.SmtpServer = smtpServer;

mail.To = emailaddress;
mail.Subject = "error occur";
mail.From = "ab*@123.com.hk";
mail.Body = error;
System.Web.Mail.SmtpMail.Send(mail);
}
it gaves error Could Not Access CDO.Message Object

So what is the problem I am hiting??

jam

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Boba | last post: by
1 post views Thread by Philip Townsend | last post: by
17 posts views Thread by Adam | last post: by
9 posts views Thread by Steve Buster | last post: by
10 posts views Thread by viashino | last post: by
1 post views Thread by =?Utf-8?B?cm9kY2hhcg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.