How to Send email using asp.net with C#

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2007
Posts: 37
Reputation: psathish2 is an unknown quantity at this point 
Solved Threads: 0
psathish2 psathish2 is offline Offline
Light Poster

How to Send email using asp.net with C#

 
0
  #1
Dec 10th, 2008
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:
  1. using System.Web.Mail;
  2.  
  3. //if i click the button send mail to other email address..i used below the code........
  4.  
  5. MailMessage mail = new MailMessage();
  6. mail.To = "mymail@gmail.com";
  7. mail.From = "mymail@gmail.com";
  8. mail.Subject ="welcome";
  9. mail.Body = "welcome";
  10. SmtpMail.SmtpServer = "www.lbmglobal.com";// server name
  11. SmtpMail.Send(mail);
  12.  
  13. Response.Write("Email was queued to disk");

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

Thank u...
Last edited by peter_budo; Dec 10th, 2008 at 6:48 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 370
Reputation: greeny_1984 is an unknown quantity at this point 
Solved Threads: 29
greeny_1984's Avatar
greeny_1984 greeny_1984 is offline Offline
Posting Whiz

Re: How to Send email using asp.net with C#

 
0
  #2
Dec 10th, 2008
smtp sevrer normally contains ip address ,check that once.if u any doubt in mails check this links

www.systemnetmail.com
If u r query is achieved,mark the thread as solved

Live and Let Live
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC