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

#1 SteveHi  Icon User is offline

  • New D.I.C Head

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

Error: Failure sending mail

Posted 03 November 2016 - 07:56 PM

Hello

I get the following error when debugging my code:

Quote

System.Net.Mail.SmtpException was unhandled by user code
HResult=-2146233088
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:

Smtpserver.Send(myMessage)


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.

Steve

Is This A Good Question/Topic? 0
  • +

Page 1 of 1