我从我的网站发送电子邮件,我想在邮箱中为其设置特殊标题,如下图所示。当我发送电子邮件时,它会显示它的地址作为标题。如何在从 asp.net 发送的电子邮件中显示特殊术语作为标题。例如我想展示这个:
Avestia Publishing 而不是 no-reply@avestia.com
我使用此代码发送电子邮件:
bodyMsg.Append("<p>Dear admin,</p>" + RadioButtonList_Prefix.SelectedItem.Text + " " + name.Text + " " + lastname.Text + " has registered in submissin system as an author.<p></br></br></br>Best regards,</p><p>Avestia Publishing</p>");
msg.IsBodyHtml = true;
msg.Body = bodyMsg.ToString();
msg.BodyEncoding = System.Text.Encoding.GetEncoding("utf-8");
msg.Priority = MailPriority.High;
// msg.ReplyTo = new MailAddress(TextBox2.Text);
msg.From = new MailAddress("no-reply@avestia.com");
msg.To.Add(new MailAddress(*****));
SmtpClient mailsender = new SmtpClient();
mailsender.Host = "SmtpClient.gerbera.arvixe.com";
mailsender.Port = 587;
mailsender.EnableSsl = true;
mailsender.Credentials = new System.Net.NetworkCredential("no-reply@avestia.com", "classaspnet");
SmtpClient smtp = new SmtpClient();
//Literal1.Text = "<script>alert(' ')</script>";
smtp.Send(msg);
有谁能够帮助我?