Hello All,
Base on the following article:
How to automatically send the same Generated PDF to Email on Button Click?
public void SendHTMLMail()
{
MailMessage Msg = new MailMessage();
MailAddress fromMail = new MailAddress("Email");
// Sender e-mail address.
Msg.From = fromMail;
// Recipient e-mail address.
Msg.To.Add(new MailAddress("Email"));
// Subject of e-mail
Msg.Subject = "Kyst - Kart";
Msg.Body += "Please check below data <br/><br/>";
Msg.Body += "Best Exported PDF Attachment";
Msg.IsBodyHtml = true;
string sSmtpServer = "";
sSmtpServer = "mail.server";
SmtpClient a = new SmtpClient();
a.Host = sSmtpServer;
a.EnableSsl = false;
a.Send(Msg);
}
Best regards