SmptClient Email not working

Discussion in 'Site Programming, Development and Design' started by roberth, Nov 17, 2010.

  1. Hello,

    I'm moving my site from godaddy to the Winhost platform and i'm trying to test my user registration code that uses smtpclient in C# to send a validation email.

    I've change the code
    <system.net>
    <mailSettings>
    <smtp>
    <network host="relay-hosting.secureserver.net" defaultCredentials="true" port="25"/>
    </smtp>
    </mailSettings>
    </system.net>

    TO

    <system.net>
    <mailSettings>
    <smtp>
    <network host="mail.socalhiking.com" userName="[email protected]" password="private"/>
    </smtp>
    </mailSettings>
    </system.net>

    which should work fine I believe. However, i'm getting this message
    Exception Details: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 173.201.192.199:25

    Any suggestions? I have not yet pointed my dns at godaddy to your nameservers as I want to do plenty of testing before I fully migrate. Could this be the problem and if so... how can I work around it?

    Thanks,
    Robert
     
    Last edited by a moderator: Oct 14, 2015
  2. Additional data

    I did an nslookup on the address and see that it's pointing to godaddy's server. I'm going to try and temporarily replace the domain address with the ip to the mail server and see if that works. I want to get everything tested on Winhost before I move my site over.
     
    Last edited by a moderator: Oct 14, 2015
  3. Ray

    Ray

    I looked at the whois record and your domain name "socalhiking.com" is not pointing to Winhost. If you ping mail.socalhiking.com you will see that this is not pointing to Winhost but to GoDaddy. You'll need to update the name servers on socalhiking.com so that the domain name points to the Winhost server.
     
    Last edited by a moderator: Oct 14, 2015
  4. Need to test before I change dns

    Thanks for the reply Ray. I was hoping to get my site fully operational and tested before I pulled that trigger. Can I just replace "mail.socalhiking..com" with the ip address to your mail server?
     
  5. Ray

    Ray

    Log into your Winhost control panel. Go to the domain manager. You will see the zone record for your Winhost account. You will see that mail.socalhiking.com points to a IP address. Use that as the SMTP server.
     
    Last edited by a moderator: Oct 14, 2015
  6. Fixed the problem

    Just replaced the domain name with the ip address for the mail server and everything is working now.
     
  7. Glad to see that you got it up and running.
     

Share This Page