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

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");

Can you please use code tags. Read this

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.