problem in sending mail ....plz help me
-
i am using following code for sending mail but its not working
<%@ Page Language="C#" %> <%@ Import Namespace="System.Web.Mail" %> private void Page_Load(object sender, System.EventArgs e) { // make sure we use the local SMTP server SmtpMail.SmtpServer = "202.165.252.143"; // create mail message object MailMessage oMessage = new MailMessage(); // set some properties oMessage.BodyFormat = MailFormat.Text; oMessage.Priority = MailPriority.High; oMessage.From = "r00d0034@yahoo.com"; oMessage.To = "rasffhidali786@msn.com"; // oMessage.Cc = "dog@mall.com"; // oMessage.Bcc = "who@areyou.com;youtoo@who.com;yodude@dude.net"; oMessage.Subject = "Test Mail"; oMessage.Body = "This is a test e-mail, please ignore.\r\rBest regards,\rWimdows.net"; // Send the e-mail SmtpMail.Send(oMessage); }
error description is given at the end i dont know what is wrong. could any body help me to run this code? ********************************************************** Server Error in '/A' Application. -------------------------------------------------------------------------------- The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for rasffhidali786@msn.com Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for rasffhidali786@msn.com ********************************************** r00d0034@yahoo.com -
i am using following code for sending mail but its not working
<%@ Page Language="C#" %> <%@ Import Namespace="System.Web.Mail" %> private void Page_Load(object sender, System.EventArgs e) { // make sure we use the local SMTP server SmtpMail.SmtpServer = "202.165.252.143"; // create mail message object MailMessage oMessage = new MailMessage(); // set some properties oMessage.BodyFormat = MailFormat.Text; oMessage.Priority = MailPriority.High; oMessage.From = "r00d0034@yahoo.com"; oMessage.To = "rasffhidali786@msn.com"; // oMessage.Cc = "dog@mall.com"; // oMessage.Bcc = "who@areyou.com;youtoo@who.com;yodude@dude.net"; oMessage.Subject = "Test Mail"; oMessage.Body = "This is a test e-mail, please ignore.\r\rBest regards,\rWimdows.net"; // Send the e-mail SmtpMail.Send(oMessage); }
error description is given at the end i dont know what is wrong. could any body help me to run this code? ********************************************************** Server Error in '/A' Application. -------------------------------------------------------------------------------- The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for rasffhidali786@msn.com Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for rasffhidali786@msn.com ********************************************** r00d0034@yahoo.comYou have to configure your SMTP Virtual Server in the Internet Information Manager. By default, it only relays mail for your domain, which is how you should be doing it anyway. It's not hard to configure, and you can always hit F1 or use the ? control box button for brief help. Some understand of SMTP is helpful, but not really required if you read the help files.
-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----