I have a web forms application. and all the emails are working fine except for 1. one of them is adding a caution-https to the link and I don't know why.
I am sending an email from a c# webforms application
String FROM = "noreply@somedomain.edu";
String FROMNAME = "Webmaster";
MailMessage message = new MailMessage();
message.From = new MailAddress(FROM, FROMNAME);
foreach (var item in adminEmails)
{
message.To.Add(new MailAddress(item));
}
message.Subject = ("A new paper has been added for the Landpower Symposium 2022");
message.IsBodyHtml = true;
message.BodyEncoding = Encoding.UTF8;
message.Attachments.Add(new Attachment(newStream, filename));
message.Body = "<p> A new paper has been attached for your review. </p> "
+ " <p>title :" + title + "</p> "
+ " <p> filename :" + filename + "</p>"
+ "<p> Posted by: " + firstName + " " + lastName + " <a href='mailto:" + email + "'>" + email + "</a> " + phone + "</p>"
+ "<p> After reviewing, you may approve or reject this paper by clicking "
+ "<a href = '" + getBaseUrl() + "/landpower/login.aspx?Page=AdminApprovePapers.aspx&FileId=" + fileid.ToString() + "'> here </a>";
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
// try to send an AWS email
// Amazon SES SMTP user name.
String SMTP_USERNAME = "***************";
// Amazon SES SMTP password.
String SMTP_PASSWORD = "*************************";
String HOST = "email-smtp.us-east-1.amazonaws.com";
int PORT = 587;
using (SmtpClient client = new SmtpClient(HOST, PORT))
{
client.Credentials = new NetworkCredential(SMTP_USERNAME, SMTP_PASSWORD);
client.EnableSsl = true;
System.Diagnostics.Debug.WriteLine("Attempting to send email...");
client.Send(message);
System.Diagnostics.Debug.WriteLine("Email sent!");
}
(I changed the actual site to somedomain)
when the message is received in outlook the link is caution-https://somedomain.edu/landpower/login.aspx?Page=AdminApprovePapers.aspx&FileId=6
does anyone have any idea what is causing that? I am sending other emails from the application and everything works fine.