Sivajihero Hero

Sivajihero Hero

  • NA
  • 105
  • 32.5k

Need to send signature with my email.

Mar 6 2016 1:18 AM
In my program I need to send email. Now email is sending successfully. But now I need to add signature to my email. This application is used by 5 users. So I need to add 5 signatures. My signature is in .htm format. So how can I send my emails with this signature.
This is my email sending program.
using (MailMessage mm = new MailMessage("xxxxxxxx", "xxxxxxxxx"))
{
mm.Subject = "Test mail";
mm.Body = File.ReadAllText("sign.htm");
mm.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "xxxxxxxxx";
NetworkCredential credential = new NetworkCredential();
credential.UserName = "xxxxxxxxxxx";
credential.Password = "xxxxxxxxx";
smtp.UseDefaultCredentials = true;
smtp.Credentials = credential;
smtp.Port = 587;
smtp.EnableSsl = false;
smtp.Send(mm);
}
}
ScriptManager.RegisterClientScriptBlock(this, this.GetType(),
"alertMessage",
"alert('message send successfully');", true);
 
 
 
I have added the sign.htm file in C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\sign.html'. Its working fine. But it will not display any images. And this is usefull for one client. If more than one person is using my system how can I do this. Is there any another way to attach this signature?
sign.htm is my signature.
 

Answers (4)