Relay access denied, system.net.mail
We have a aspx.net site which send out mail to users using a web server hosted externly.
This have been working perfectly for a couple of years sending 100-1000 mails pr day, but recently use开发者_如何学Gors have started to report that they do not recieve mails - some days they recieve all mails (2-100) and some days only 40-60%.
All mails are formatted equal and have the same content (except for some dynamic fields like name, password etc).
I've looked at my error log and now I see this error when mails are lost:
system.net.mail.smtpexception: transaction failed the server response was: <name@domain.tld> Relay access denied
Any feedback would be appriciated.
Regards and happy coding, Thomas
"Relay access denied" is usually caused either because the mail server doesn't recognize the domain.tld domain in the senders address so wont send mail on their behalf, or because the server requires SMTP authentication which was not provided.
server which trying to relay message requires authentication from the mail which SMTP sent.So try to use domain credentials to send mail.
SMTP server can be configured to reject your requests under high load.
精彩评论