Click here to Skip to main content
15,912,837 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have use code in c# for sending mail
C#
string server = ConfigurationManager.AppSettings.Get("MailServer");
string Userid = ConfigurationManager.AppSettings.Get("AthServer");
string password = ConfigurationManager.AppSettings.Get("AthPwd");
SmtpClient smtp = new SmtpClient(server);
System.Net.Mail.MailMessage mails = new System.Net.Mail.MailMessage();
mails.From = new MailAddress(mail.MailFrom);
mails.To.Add(mail.MailTo);
if (!string.IsNullOrEmpty(mail.MailCc)) {
    mails.CC.Add(mail.MailCc);
}
mails.Subject = mail.Subject;
mails.Body = mail.MailBody.ToString();
mails.IsBodyHtml = true;
smtp.Credentials = new NetworkCredential(Userid, password);
smtp.Send(mails);

i have got exception :
Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Service not available, closing transmission channel. The server response was: p3plsmtpa06-08.prod.phx3.secureserver.net ESMTP No Relay Access Allowed

whats meaning of this?

thank you.
Posted
Updated 11-Jun-13 3:02am
v2

That's a config issue in the mail server. It doesn't allow you (your IP, your sender address) to send mail to the recipient.
A properly configured mail server is extremely restrictive with relaying, to prevent it from being abused by spammers to send mails.

Source: http://stackoverflow.com/a/7684730[^]

[Edit]Reference to original answer added[/Edit]
 
Share this answer
 
v3
Hello,

SMTP stands for Simple Mail Transfer Protocol, and most email services in the world use SMTP to send email.

Mail relay is the process of transferring an email from one server to another for delivery. An example of this is if you work for Company A and send an email to someone at Company B, you connect to your company’s SMTP server which then transmits (relays) your email to the server owned by Company B. One server accepting an email from another server is called "relaying".

If you were to send an email to a person with an email address at the same domain as yours, there would not be a second server involved, and hence is not considered as relaying.

An SMTP Relay is a service that routes email through a trusted 3rd party to deliver your email. An SMTP relay service can be open (Unrestricted) in which case any one can connect to the relay server and send a message to any one.

Open relay servers are thus frequently misused by spammers sending unsolicited emails. Many organizations thus setup their SMTP servers to ask for the user's credentials in terms of their id and password. Such SMTP server will allow users to relay their message to a different server only if these credentials are correct. This authentication mechanism ensures that no one outside the organization can use the company's SMTP server to send message to a third party recipient. Some organizations will even restrict the use of their relay servers from particular IP Address or Ip Addresses range only.

In your case you are supplying valid credentials and hence it might be related to the relay policy which does not permit originating emails from your IP address. Please consult your Network Administrator or ISP.

Regards,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900