0

Hi all,
I am new in ASP.NET.What coding I have to use to send an acknowledgement via Email to the concerned person while storing data in the database using ASP.NET1.0?Pls help........


Thanks

Jaya

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by arjunsasidharan
0

first do the insertion of data into database at final send email with some msg. u need to
1> add reference if using 1.1 use cdonts lib 2.0 cdosys and smtp lib
2> add namespace using system.web.mail (1.1) system.net.mail(2.0)
3> take a string varible
string userInfo = string .Empty;
string AppEMailFrom = "jaya@matt.com";\\ receving person gets the info who had mailed.
4>userInfo = "Hi,<br>click the below link ,to confirm your registration blab blab\n"+"<br>";
5>MailMessage msg = new MailMessage();
msg.From = new MailAddress("www.jayamatti@xyz", "developer");
msg.To.Add(new MailAddress(Txtemail .Text));// mail to be send
msg.Subject = "hi";
msg.Body = userInfo;
msg.IsBodyHtml = true;
msg.Priority = MailPriority.High;// recieve high pririoty
SmtpClient c = new SmtpClient("mail.xyz.com");// name of u r smpt server
c.Send(msg);
Response.Write("Mail has been sent");

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.