Hi
I am trying to write a code to send an email from yahoo email to another yahoo email (an email I made for testing) using yahoo smtp server smtp.mail.yahoo.com
I wrote the following code and it give me this exception
Could not access 'CDO.Message'
 
here is the code :
 
MailMessage oMessage =
new MailMessage();

oMessage.To = "[EMAIL PROTECTED]";

oMessage.From = "[EMAIL PROTECTED]";

oMessage.Subject = "Test message sent using System.Web.Mail";

oMessage.Body = "This is a test message.";

oMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2;

oMessage.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"] = "smtp.mail.yahoo.com ";

oMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "[EMAIL PROTECTED] ";

oMessage.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "123456789";

oMessage.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1;

System.Web.Mail.SmtpMail.SmtpServer = "smtp.mail.yahoo.com";

System.Web.Mail.SmtpMail.Send(oMessage);

 

Any one can help



SPONSORED LINKS
Basic programming language C programming language Computer programming languages
Programming languages C++ programming language Software programming language


YAHOO! GROUPS LINKS




Reply via email to