All my email goes directly to spam

Last post 11-10-2008 11:56 AM by murtazahrizvi. 1 replies.

Sort Posts:

  • All my email goes directly to spam

    11-10-2008, 5:03 AM
    • Member
      30 point Member
    • RajibRoy
    • Member since 07-15-2008, 3:48 PM
    • Dubai, UAE
    • Posts 40
    Hi , I am using the following code to send email but all my email goes directly to spam Please help me.

     Dim mailMessage As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
    mailMessage.From = New System.Net.Mail.MailAddress(FromEmail)
    mailMessage.To.Add(New System.Net.Mail.MailAddress(txtEmail.Text.Trim()))
    mailMessage.Priority = Net.Mail.MailPriority.Normal

    mailMessage.IsBodyHtml = True

    mailMessage.Subject = txtSubject.Text.Trim()
    mailMessage.Body = FCKeditor1.Value & FooterMessage

    Dim smtpClient As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient(127.0.0.1)
    Dim mailAuthentication As System.Net.NetworkCredential = New System.Net.NetworkCredential("mail@webplannernewsletter.com", "subscribe", "webplannernewsletter.com")
    smtpClient.Credentials = mailAuthentication

    Try
    smtpClient.Send(mailMessage)
    lblTestMessage.Text = "Test email send"
    lblTestMessage.ForeColor = Drawing.Color.Green
    Catch smtpExc As System.Net.Mail.SmtpException
    'Log error information on which email failed.
    lblTestMessage.Text = "Some error on SMTP!"
    lblTestMessage.ForeColor = Drawing.Color.Red
    Catch ex As Exception
    'Log general errors
    lblTestMessage.Text = "Some error!"
    lblTestMessage.ForeColor = Drawing.Color.Red
    End Try

    Rajib Roy

    Sr. Programmer

    Web Planner

    Dubai, U.A.E

    www.seo-mama.com

    www.khonz.com
    Filed under: ,
  • Re: All my email goes directly to spam

    11-10-2008, 11:56 AM
    • Participant
      794 point Participant
    • murtazahrizvi
    • Member since 09-03-2008, 12:53 AM
    • Pakistan
    • Posts 141

    Try changing

    mailMessage.IsBodyHtml = True to mailMessage.IsBodyHtml = False

    This will bypass many mail server spam checks

     

    When the going gets tough - the tough gets going

    ------------------------------------------------------------------
    If you find this helpful then please mark this post as Answer.
Page 1 of 1 (2 items)