Last post Sep 09, 2008 03:16 PM by isjf
Sep 08, 2008 10:20 PM|isjf|LINK
I trid 30 times , it only success 3 times
almost of time , shows cant access 'CDO.Message' object?
my code is below
MailMessage MObj = new MailMessage();
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("UserName： " + Name ) ;
sb.Append("Password：" + PW);
MObj.To = Mail;
MObj.From = "RELove";
MObj.BodyFormat = MailFormat.Text;
MObj.Subject = "【user Password】";
MObj.Body = sb.ToString();
SmtpMail.SmtpServer = "ms21.hinet.net";
Sep 09, 2008 04:37 AM|mohanbrij|LINK
As far as I know CDO was used in classic ASP, for sending mails, but the code you have provided looks like Microsoft VB.NET codes piece
Anyway you can check this link, this has got some solutions for the error given by you
Sep 09, 2008 03:16 PM|isjf|LINK
hi thank you , I did this way
I have no idea why this suggestion works, but I found it on the web. I figured I would mention it, just in case Suggestion 1 did not work. Instead of specifying
SmtpMail.SmtpServer = "127.0.0.1"
SmtpMail.SmtpServer.Insert( 0, "127.0.0.1 or your mail server name here")
but I got another problem , I didn't catch any error and the message shows mail sent success !!
I tried sent mail to myself ... ( tried 3 kind of mail , yahoo, hotmail, gmail) I didn't receive anything..