0 Replies - 709 Views - Last Post: 03 November 2016 - 07:56 PM

#1 SteveHi   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 62
  • Joined: 07-June 15

Error: Failure sending mail

Posted 03 November 2016 - 07:56 PM


I get the following error when debugging my code:


System.Net.Mail.SmtpException was unhandled by user code
Message=Failure sending mail.
Message=The remote name could not be resolved: 'mail.server'

So, I put a Breakpoint on this line in my code:


then pressed F5 to load the page in my browser, typed in a (valid) user's email in the email field, and got this:

Posted Image

I am not sure what that tells me, but I suspect the problem is that my code cannot 'see' my Web hosting service's SMTP
server, which is called 'mail.server'.

Does that mean I need a different, local server (my IIS 10 server?) to test my code locally, and then change it back to 'mail.server' when I compile and upload the pages?

Thank you.


Is This A Good Question/Topic? 0
  • +

Page 1 of 1