I need to send an email in asp.net but I need sender appears like \"MySiteName\" without info@mysitename.com.
Like this:
using(MailMessage message = new MailMessage(
new MailAddress("You@Domain.com", "Your Name"),
new MailAddress("Recipient@OtherDomain.com", "Their Name")
)) {
message.Subject = ...;
message.Body = ...;
new SmtpClient().Send(message);
}
You will need to enter the SmtpClient
's connection settings in Web.config