...

View Full Version : Relay Access Denied



snowieken
01-16-2007, 05:13 AM
Probably the most encountered error message ever when trying to send mail with ASP.NET... But up to now I haven't really found a solution yet. I need my web page to be able to send an e-mail to an external address. On my local server it works, the e-mail arrives on the specified address, but on my host, I get a "Relay Access Denied" error. I realize most mail providers have set this up as a security method against spam, but how come it works locally then?

There are so many applications out there that send you e-mail without problems, surely there must be a way to achieve this? Is there a way to "authenticate" my website to the mail provider of the recipient somehow, so that it accepts mail coming from it? In this case it's only one fixed address, but those other applications out there I am speaking of are able to send e-mail to all kinds of addresses... ("enter a valid e-mail address here and we will send you your code/pictures/whatever...").

otaku149
01-16-2007, 02:08 PM
Which smtp are you using "localhost" or "mail.yourdomain.com"

Did you contact your host about that?

Also some smtp server require authentication within your code, something like the following sample:

http://www.codeproject.com/useritems/aspnet_send_email.asp

snowieken
01-16-2007, 10:06 PM
I'm using the SMTP server from my internet provider, so essentially the e-mails come from my address. It requires authentication, but my web.config should be set up correctly to take care of that authentication. Isn't this error message caused by the recipient's e-mail then?

otaku149
01-16-2007, 11:03 PM
On my local server it works, the e-mail arrives on the specified address, but on my host, I get a "Relay Access Denied" error.



I'm using the SMTP server from my internet provider...


On your local server you can use the SMTP server from your internet provider but on your host you can't, you need to use the SMTP server provided by your host something like mail.yourdomain.com

Just contact your host and ask them which SMTP server to use in your ASP.Net page to send email. Most of the time it's mail.yourdomain.com (replace yourdomain.com by your domain name)

snowieken
01-17-2007, 09:34 AM
On your local server you can use the SMTP server from your internet provider but on your host you can't, you need to use the SMTP server provided by your host something like mail.yourdomain.com

Just contact your host and ask them which SMTP server to use in your ASP.Net page to send email. Most of the time it's mail.yourdomain.com (replace yourdomain.com by your domain name)Oh, okay. I will try that then, thanks. I'll let you know if it worked or not.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum