I am doing a Flight booking system and I want to send an E-Mail to the user which wiil contain the E-Ticket of his travel. The E-Ticket is generated dynamically with the booking ID fetched from the database and the other details from the previous pages like Name of the passenger and all. So how can I send him the dynamically generated E-Ticket to his E-Mail ID?
Share
WARNING: My original answer to this question suggest using System.Web.Mail for sending e-mails. However, this API has been replaced by System.Net.Mail back in .NET 2.0, and the classes of System.Web.Mail are now all marked obsolete/deprecated.
You can use the System.Web.Mail.Mailmessage class: