send email issues

  • Thread starter Thread starter Ron
  • Start date Start date
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
 
Hi,

The problem is that your mail server doesn't allow relaying. That occurs
when your From mail address is from a different domain. For example, you
can't send mail from an email (e-mail address removed) from an (e-mail address removed)
using an AOL server, it just isn't allowed. Your from email address must be
from your domain for it to work. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

Ron said:
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/smtpauthenti
cate","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
 
Hi,

Messed up in my post. You can't send from a compuware address to an aol
address using an aol server or any other server unless they allow relaying.
Basically your from address needs to be of the same server you are sending
from. Ken.
 
Back
Top