Can I send email at development machine?

Discussion in 'Site Programming, Development and Design' started by longmatch, Apr 11, 2011.

  1. The email function works fine at server, so STMP server was configured correctly. The email function does not work in development machine, so I have to publish website to the server for testing, and it takes a lot of time. Is there any way around? Thanks
     
  2. If you're authenticating properly (and it works from the server) it should work from any machine. Check and make sure your ISP at home (or wherever your dev box is) is not blocking outgoing mail on port 25, and that you don't have a firewall or anti-virus blocking the outgoing mail.
     
  3. I will try your suggestion tonight.
    I just found I can only send email to my domain email account, not other public email accounts such as yahoo email. The error I got is "Mailbox unavailable. The server response was: <[email protected]> No such user here
    " Do you have any suggestions? Thanks.
     
  4. Ray

    Ray

    That definitely indicates that you are not passing smtp authentication correctly. For now, if you are passing variables for smtp authentication try hard coding it in. You may want to look at this kb article as an example on how t use system.net.mail and to pass smtp authentication. http://support.Winhost.com/KB/a650/how-to-send-email-in-aspnet.aspx
     
    Last edited by a moderator: Oct 14, 2015
  5. My problem is that I did not use email address as username in my smtp configuration. After this change, it works just fine. Thanks

    By the way, how can I know whether my ISP blocks outgoing mail on port 25 and firewall or anti-virus blocks the outgoing mail? Thanks
     
  6. Ray

    Ray

    You will need to perform a telnet test on your computer.

    First do a traceroute test to make sure it is resolving to the correct IP address of the mail server. You can see what IP address your account is pointing to by going into the Winhost control panel under Domains Manager.

    Then do a telnet test specifying the smtp port 25 to your mail server. Here is an example of the command.

    tracert mail.mydomain.com

    ..and

    telnet mail.mydomain.com 25

    If you get a lot of drop packets or you get a connection cannot be reached than you'll know something is blocking the connection to the email server.
     
    Last edited by a moderator: Oct 14, 2015
  7. When I telneted my email server. I got this message Connecting mail.mydomain.com... could not open connection to the host, on port 23: connect failed. Do I need to change the port to 25 (local?)? Thanks
     
  8. Ray

    Ray

    Yes. You should be connecting to port 25 not port 23. And just to be clear, you did change mail.mydomain.com to your actual mail server name, correct?
     
  9. I had to change to Port 587, when running on the localhost.
     

Share This Page