"Contact Us" form not working after hosting with Godaddy
How can I send email from my hosting account? The code works locally, but
it does not work from my hosting account. I have used the following
methods:
SmtpClient( "smtp.gmail.com", 587 )
SmtpClient( "relay-hosting.secureserver.net" )
The first method works on my local development system fine, but the
following exception is thrown in my hosting account:
[SecurityException: Request for the permission of type
'System.Net.Mail.SmtpPermission, System, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed.]
The second method using relay-hosting.secureserver.net throws the
following exception:
[SmtpException: Mailbox name not allowed. The server response was: sorry,
your mail was administratively denied. (#5.7.1)]
How we can solve this?
No comments:
Post a Comment