i have configured a signature on my gmail account. But when i send it from winforms, it seems that it does not include the signature. Here is my code:
try
{
SmtpClient client = new SmtpClient("smtp.gmail.com", 587);
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = false;
NetworkCredential credential = new NetworkCredential("xxxxx@gmail.com", "xxxx");
client.Timeout = 20000;
MailMessage mailMessage = new MailMessage();
mailMessage.From = new MailAddress("xxxxx@gmail.com", "Test Mail");
mailMessage.Priority = MailPriority.High;
mailMessage.IsBodyHtml = true;
mailMessage.To.Add("xxxxx@gmail.com");
mailMessage.Subject = "Test Mail"
mailMessage.Body = "This is a <b>test</b> av <b>{2}</b> mail.";
client.Credentials = credential;
client.EnableSsl = true;
client.Send(mailMessage);
}
catch (Exception ex)
{
MessageBox.Show("Error" + ex, "Message", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}