Error in outgoing mail from webpage

Discussion in 'Email' started by akashatdiscountasp, Mar 19, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am trying to send an automated email from webpage on my site.
    I tried SmtpMail.Send() method as well as smtpClient.Send, no success.

    Which will be the easiest way to set up outgoing email from webpage. SmtpMail.Send() worked on my development machine but doesn't after pushing it on ftp server site. I know I have to change settings and specify smtp server, but don't know how?

    I tried SmtpMail.SmtpServer property in my code.
    Code:
    SmtpMail.SmtpServer ="smtp.mydomainname.org" 
    but no luck.

    Do you think it is credential issue? If yes how to set up credentials for 'smtpClient.Credentials'?
    thanks a lot in advance!
     
  2. Hi,
    Which programing language are you using?
    All the best,
    Mark
     
  3. I am using C# and ASP.NET

    Thanks
     
  4. >> Notice that in code and in your web.config you should use "localhost" unless you are using ASP.NET Health Monitoring.

    What should I use if I am, in fact, using ASP.NET Health Monitoring?
     
  5. Hi,
    With Health Monitoring it should be like this:
    <system.net>
    <mailSettings>
    <smtp from="[email protected]" deliveryMethod="Network">
    <network host="localhost" port="25" password="password" userName="[email protected]"/>
    </smtp>
    </mailSettings>
    </system.net>
     
  6. Ok, so it seems the key point then is that for a hosting account on DiscountASP.NET, you should list "localhost" as your smtp host. You folks should try maybe to include that tidbit on the Account Info screen in the Control Panel, because coming from other hosting providers using "localhost" is typically not the case.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page