AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 How to registered user and send email confirmation to visitors ?
Posted by RAJESH KUMAR VISHWAKARMA on  12/8/2009 4:32:28 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend

Could u plz tell me how to send Email Confirmation to the users after registering users?

Explanation:-

I have one Registration form and One Submit_buuton.
now i want to send registerd userid and password (UId and Password are being retrieved Database Sql)
by email to the users
Thank you very much with great support.
R.k.vishwa

Post Your Reply Post New Question

 Viewer's Reply
Email Confirmation
Answered By Shanu_Sudha on 12/11/2009 4:42:44 AM
NameSpace:
--------------------

using System.Web.Mail;

In Code Behind:
---------------------

protected void SendEmail()
{
MailMessage mail = new MailMessage();
mail.To = txtEmail.Text;
mail.From = "You Mail ID";
mail.Subject = "New User Registration";
mail.Body = "Welcome you. Your username is " + txtUserName.Text + " and Your password is " + txtPassword.Text + "";
SmtpMail.SmtpServer = "Your Mail Server";
SmtpMail.Send(mail);
Page.RegisterStartupScript("Update", "<script>alert('Mail sent Successfully')</script>");
return;
}
 
Sending Email with Dynamic Contents from Asp.Net
Answered By Moderator1 on 12/11/2009 10:17:27 PM
Hi,

To embed dynamic contents in your email, you can read our article in the below url,

http://www.aspdotnetcodes.com/Send_Email_Dynamic_Content.aspx
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
The Beginner's Guide to Joomla
Building a Web Application Security Program
No Nonsense XML Web Development With PHP - Free 146 Page Preview!