I have a C # code that sends emails with HTML, so far, okay, the problem is that I can not send scripts (JS). Yes, I understand why, it must be security reasons. But do not have burlar
or do otherwise? "No malicious intent." My code:
using (MailMessage mail = new MailMessage())
{
mail.From = new MailAddress("[email protected]");
mail.To.Add("[email protected]");
mail.Subject = "xxx";
mail.Body = @"<script>SCRIPT aqui.</script>";
mail.IsBodyHtml = true;
using (SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587))
{
smtp.Credentials = new NetworkCredential("[email protected]", "xxx");
smtp.EnableSsl = true;
smtp.Send(mail);
}
}