.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Send Login details to user after registration

Posted By: Rina     Posted Date: January 03, 2012    Points:5   Category :ASP.Net
How to send login detail to user after registration using mail in asp.net

Responses
Author: Amit Mehra             
Posted Date: January 03, 2012     Points: 20   

Hi,

You can use MailMessage class to send mail using .NET framework..let me know if you need code to send mail..


Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Rina             
Posted Date: January 04, 2012     Points: 20   

thank you sir...but I need code to send mail.. and I m confused that after registration directly user id and password will be sent to user's mail...how I can do that?? please reply..thank you..

Author: Sasi Prabhu             
Posted Date: January 06, 2012     Points: 20   

Try :

In web.Config

<system.net>
<mailSettings>
<smtp>
<network host="<smtp.servername.com>" userName="<UserID>" password="<Password>" port="<PortNo>" defaultCredentials="false"/>
</smtp>
</mailSettings>
</system.net>



MailMessage mailmsg = new MailMessage();
mailmsg.From = new MailAddress(ConfigurationManager.AppSettings["ReplyEmail"].ToString());
mailmsg.To.Add(txtTo.Text);
mailmsg.CC.Add(txtCC.Text);
mailmsg.Bcc.Add(txtBcc.Text);
mailmsg.IsBodyHtml = true;
mailmsg.Subject = txtSubject.Text;
mailmsg.BodyEncoding = System.Text.Encoding.UTF8;
mailmsg.Body = txtBoby.Text;
SmtpClient smtpc = new SmtpClient();
smtpc.Send(mailmsg);





Thanks & Regards,
Sasi Prabhu.


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend