L
Lokesh
Hi,
I am using MailMessage class to send emails. But the mails sent using my
application are recognised as spam. But the same mail when sent using outlook
express, are not recognised as spam. Is this because my applications are not
using any digital signatures or envelopes while sending mail. Using digital
signature or envelopes will serve the purpose. Below is my code to send mail:
Try
msg1.From = "(e-mail address removed)"
msg1.To = "(e-mail address removed)"
msg1.Attachments.Add(New
MailAttachment("C:\Inetpub\wwwroot\WebApplication1\Images\Sunset.jpg"))
msg1.Subject = txtSubject.Text
msg1.Body = "<img src=""HOMEPAGE-UnsubscribeTest.jpg""
width=""360"" height=""475"" border=""0"" alt=""Register/Login""
usemap=""#HOMEPAGE_UnsubscribeTest_Map"">"
msg1.Body &= "<map name=""HOMEPAGE_UnsubscribeTest_Map""><area
shape=""rect"" alt=""Unsubscribe"" coords=""14,458,91,472""
href=""http://www.textilecreations.com/TextileCreations/EmailUnsubscribe.htm"" target=""_blank""> </map>"
msg1.Body &= "<a
href=""http://www.textilecreations.com/TextileCreations/EmailUnsubscribe.aspx""> Unsubscribe</a>"
msg1.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "192.168.5.10"
SmtpMail.Send(msg1)
Catch ex As Exception
Throw ex
End Try
I am using MailMessage class to send emails. But the mails sent using my
application are recognised as spam. But the same mail when sent using outlook
express, are not recognised as spam. Is this because my applications are not
using any digital signatures or envelopes while sending mail. Using digital
signature or envelopes will serve the purpose. Below is my code to send mail:
Try
msg1.From = "(e-mail address removed)"
msg1.To = "(e-mail address removed)"
msg1.Attachments.Add(New
MailAttachment("C:\Inetpub\wwwroot\WebApplication1\Images\Sunset.jpg"))
msg1.Subject = txtSubject.Text
msg1.Body = "<img src=""HOMEPAGE-UnsubscribeTest.jpg""
width=""360"" height=""475"" border=""0"" alt=""Register/Login""
usemap=""#HOMEPAGE_UnsubscribeTest_Map"">"
msg1.Body &= "<map name=""HOMEPAGE_UnsubscribeTest_Map""><area
shape=""rect"" alt=""Unsubscribe"" coords=""14,458,91,472""
href=""http://www.textilecreations.com/TextileCreations/EmailUnsubscribe.htm"" target=""_blank""> </map>"
msg1.Body &= "<a
href=""http://www.textilecreations.com/TextileCreations/EmailUnsubscribe.aspx""> Unsubscribe</a>"
msg1.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "192.168.5.10"
SmtpMail.Send(msg1)
Catch ex As Exception
Throw ex
End Try