Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Nov 2004
    Location
    The land of chocolate
    Posts
    226
    Thanks
    1
    Thanked 16 Times in 16 Posts

    Relay Access Denied

    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...").
    -Snow

    Susie, if you want to see your doll again, leave $100 in this envelope by the tree out front. Do NOT call the police. You CANNOT trace us. You CANNOT find us.

    Sincerely,
    - Calvin.

  • #2
    Regular Coder
    Join Date
    May 2006
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...send_email.asp

  • #3
    Regular Coder
    Join Date
    Nov 2004
    Location
    The land of chocolate
    Posts
    226
    Thanks
    1
    Thanked 16 Times in 16 Posts
    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?
    -Snow

    Susie, if you want to see your doll again, leave $100 in this envelope by the tree out front. Do NOT call the police. You CANNOT trace us. You CANNOT find us.

    Sincerely,
    - Calvin.

  • #4
    Regular Coder
    Join Date
    May 2006
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by snowieken
    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.
    Quote Originally Posted by snowieken
    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)

  • #5
    Regular Coder
    Join Date
    Nov 2004
    Location
    The land of chocolate
    Posts
    226
    Thanks
    1
    Thanked 16 Times in 16 Posts
    Quote Originally Posted by otaku149 View Post
    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.
    -Snow

    Susie, if you want to see your doll again, leave $100 in this envelope by the tree out front. Do NOT call the police. You CANNOT trace us. You CANNOT find us.

    Sincerely,
    - Calvin.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •