DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   How to Send email using asp.net with C# (http://www.daniweb.com/forums/thread161561.html)

psathish2 Dec 10th, 2008 12:39 am
How to Send email using asp.net with C#
 
hi ...
i want send email in the my application server to other email address..

below the code i used but not working plz help me.......

Code

header file:
using System.Web.Mail;

//if i click the button send mail to other email address..i used below the code........

 MailMessage mail = new MailMessage();
          mail.To = "mymail@gmail.com";
            mail.From = "mymail@gmail.com";
            mail.Subject ="welcome";
            mail.Body = "welcome";
            SmtpMail.SmtpServer = "www.lbmglobal.com";// server name
          SmtpMail.Send(mail);

            Response.Write("Email was queued to disk");

please check this code or give another code..........

Thank u...

greeny_1984 Dec 10th, 2008 1:59 am
Re: How to Send email using asp.net with C#
 
smtp sevrer normally contains ip address ,check that once.if u any doubt in mails check this links

www.systemnetmail.com


All times are GMT -4. The time now is 4:28 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC