Unable to send email from my local machine using my smtp account

Discussion in 'Email' started by jfbernier, Mar 29, 2011.

  1. Hi, I'm unable to send email from my local machine using my smtp account.

    This is strange because when my web application is running on the server, I have no problem to send email using System.Net.Mail... But when I'm running my app in debug mode on my local machine or try to send email from my outlook using smtp (mail.mydomain.com), I get the following error messages:

    From my web app:
    Failed to send mail.

    From Outlook:
    Send test e-mail message: Outlook cannot connect to your outgoing (SMTP) e-mail server. If you continue to receive this message, contact your server administrator or Internet service provider (ISP).

    I guess my code is ok in my web app since it's working to send email on the server. My Outlook config has been set as it is explained at the following link: http://support.Winhost.com/KB/a911/...ccount-in-outlook-2010.aspx?KBSearchID=274713


    BTW, I'm able to get incoming mail from outlook with my mail.maydomain.com pop3 server.

    Please let me know if you need more info.

    Thanks for your help

    JF
     
    Last edited by a moderator: Oct 14, 2015
  2. Please disregard this post as I found a answer to my problem in an older post. The problem was that my ISP is already using port 25 for smtp so this is why I was unable to connect to smtp server.

    Thanks
     
  3. Ray

    Ray

    So what was the solution? Did you set it up to use the alternative smtp port 587?
     
  4. Dev testing ASP .Net SMTP client

    FYI for all you other newbees out there: You can only connect to the Email service host while your SMTP client is running from the Winhost server.

    If, like me, you prefer to develop your code on your local box for testing purposes, you need to host the email from somewhere besides the Winhost service.

    I was scratching my head for quite a while trying to fix the connection failure problem with my simple System.Net.Mail.SmtpClient test code. Finally, I found another post that said something about "email service cannot be forwarded". So, I deployed to Winhost and it worked fine...
     
    Last edited by a moderator: Oct 14, 2015
  5. Ray

    Ray

    That doesn't seem to make sense? If you have a web site and you want it to use another email server, you certainly do not have to use the Winhost email server. You can use any other email server so long as you pass the correct values. Remember, each email server may have different settings imposed by their own email administrator.
     
    Last edited by a moderator: Oct 14, 2015

Share This Page