show the mail before sending
Posted on 2006-07-23
In ASP.NET 2.0 in C#
I prepare a mail to be send with all that is needed
but I don't want to send it automatically.
I want to show the mail on the screen, to let the user check it and then
the user will press the button of send.
This is my preparing of the mail. What do I have to change?
MailAddress to = new MailAddress("firstname.lastname@example.org");
MailAddress from = new MailAddress("email@example.com");
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(from, to);
message.Subject = "test email1";
message.Body = "test email1 from business-solutions on 18/06/2006";
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient();