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
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
Good start — is right to think about sending an acknowledgement after storing data, and is right about using code tags when you post examples. The practical goal is reliability: make sure a saved record always leads to a sent (or at least queued) acknowledgement and that transient mail errors do not lose user data or hang the web request.
A simple, robust flow to implement (no code shown here) is:
EmailOutbox row as part of the same transaction. Typical columns: Id, ToAddress, Subject, Body, CreatedAt, Attempts, LastAttemptAt, Status, RelatedEntityId, Token. Status, and retries with backoff on failure.For confirmation emails include a short-lived, cryptographically-random token stored (or hashed) in the DB and include a verification URL that maps to that token. Avoid putting sensitive info in email bodies. Implement logging and an alert for repeated send failures. For deliverability, ensure correct SMTP authentication, TLS, open outbound mail ports, and appropriate DNS (SPF/DKIM) for your sending domain.
Troubleshooting tips: check server SMTP logs, firewall rules, and IIS/App logs; add clear exception handling around the send routine; keep retry counts and dead-letter records so you can inspect failures. If you must stay on ASP.NET 1.0, the outbox + external sender pattern prevents lost emails when the app pool recycles; consider upgrading the framework when possible.
Jump to Post— arjunsasidharan 297Can you please use code tags. Read this
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 = "";\\ 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");
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.