R
Ron
hi guys,
I am trying to send email using smtpMail.
I can send emails inside the organization, but out of the organization I get
an error "The server rejected one or more recipient addresses. The server
response was: 550 5.7.1 Unable to relay for ........"
now I tried to add username and password for the server to relay but it is
still not working.
this is the example i used:
private void Page_Load(object sender, System.EventArgs e)
{
MailMessage mail = new MailMessage();
mail.To = "(e-mail address removed)";
mail.From = "(e-mail address removed)";
mail.Subject = "this is a test email.";
mail.Body = "Some text goes here";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1"); //basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "my_username_here"); //set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "super_secret"); //set your password here SmtpMail.SmtpServer = "mail.myOrganization.com"; //your real server goeshere SmtpMail.Send( mail );}appreciate any help/ideasRon
I am trying to send email using smtpMail.
I can send emails inside the organization, but out of the organization I get
an error "The server rejected one or more recipient addresses. The server
response was: 550 5.7.1 Unable to relay for ........"
now I tried to add username and password for the server to relay but it is
still not working.
this is the example i used:
private void Page_Load(object sender, System.EventArgs e)
{
MailMessage mail = new MailMessage();
mail.To = "(e-mail address removed)";
mail.From = "(e-mail address removed)";
mail.Subject = "this is a test email.";
mail.Body = "Some text goes here";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1"); //basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "my_username_here"); //set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "super_secret"); //set your password here SmtpMail.SmtpServer = "mail.myOrganization.com"; //your real server goeshere SmtpMail.Send( mail );}appreciate any help/ideasRon