Login    Forum    Search    FAQ   Blog

Board index » Server Side Development » ASP 3.0




 Page 1 of 1 [ 4 posts ] 



Author Message
 Post subject: how to send email in asp.net using c#
 Post Posted: Sun Nov 22, 2009 2:35 pm 
Offline

Joined: Sat Feb 21, 2009 12:32 pm
Posts: 81
i want code for sending emails in asp.net using c#.net.


Top 
 Post subject: Re: how to send email in asp.net using c#
 Post Posted: Sun Nov 22, 2009 2:36 pm 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
Put this in your web.config:

Code:
   1. <system.net> 
   2.   <mailSettings> 
   3.     <smtp from="your@mail.com"> 
   4.       <network host="your.mail.com" port="25" userName="username" password="password"/> 
   5.     </smtp> 
   6.   </mailSettings> 
   7. </system.net> 




This is the code to send the mail:


Code:
# SmtpClient smtpClient = new SmtpClient(); 
# MailMessage message = new MailMessage(); 
# message.To.Add("toemail"); 
# message.IsBodyHtml = true; 
# message.Body = "<html><head></head><body>" + 
# "<p>hi</p>"+ 
# "</body></html>"; 
# smtpClient.Send(message);


Top 
 Post subject: Re: how to send email in asp.net using c#
 Post Posted: Sun Nov 22, 2009 2:36 pm 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
heck out this link

http://manojk-aspdotnet.blogspot.com/20 ... mails.html


convert into C# http://www.developerfusion.com/tools/co ... arp-to-vb/


for more info check out below link

http://forums.asp.net/t/1493020.aspx


Top 
 Post subject: Re: how to send email in asp.net using c#
 Post Posted: Sun Nov 22, 2009 2:36 pm 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
lease check this link..

http://weblogs.asp.net/scottgu/archive/ ... 32854.aspx



Thanks.


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 4 posts ] 




Board index » Server Side Development » ASP 3.0


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron