title: SMTPClient email sometimes going to Junk Mail
body: <p>I'm having a difficult time understanding why email I send from my website by using SMTP is going to Outlook's junk mail.  Here is my code:</p>
  
  <pre><code>       Dim windowsLoginName As System.String = HttpContext.Current.User.Identity.Name
  
      Dim split As String() = Nothing
      Dim vname As String
  
      'Get network login name (name only)
      split = windowsLoginName.Split("\".ToCharArray)
      vname = split(1)
  
  'create the mail message
      Dim mail As New MailMessage()
  
      'set the addresses
      mail.From = New MailAddress(vname &amp; "@x.com")
      mail.To.Add(txtWhoApproves.Text)
  
      'set the content
      Dim varstreason, vartxt, vartxt2, varbody As String
      varstreason = DropDownList1.SelectedItem.Text
  
      If TextBox1.Text = TextBox2.Text Then
  
          If CheckBox1.Checked = True Then
              varbody = TextBox3.Text &amp; " has requested the following time off:  " &amp; System.Environment.NewLine &amp; varstreason &amp; " - " &amp; TextBox1.Text &amp; " - All Day"
          Else
              vartxt = varstreason &amp; " - " &amp; TextBox1.Text
              vartxt2 = DropDownList2.SelectedValue &amp; " to " &amp; DropDownList3.SelectedValue
              varbody = TextBox3.Text &amp; " has requested the following time off:  " &amp; vartxt &amp; " - " &amp; vartxt2
          End If
  
      Else
          varbody = TextBox3.Text &amp; " has requested the following time off:  " &amp; varstreason &amp; " - " &amp; TextBox1.Text &amp; " to " &amp; TextBox2.Text
      End If
  
      mail.Subject = "Time Off Approval Requested"
      mail.Body = varbody
  
      'send the message
      Dim smtp As New SmtpClient("(IP Address of email server)")
  
      'to authenticate we set the username and password properites on the SmtpClient
      'smtp.Credentials = New NetworkCredential("username", "secret")
      smtp.Send(mail)
  </code></pre>
  
  <p>I have the email coming from whoever is logged onto the network.  Since it's multiple people, I remarked out smtp.Credentials because the password is different for each user (and changes periodically).  I'm thinking that this is somehow causing the email to sometimes go into the junk email.</p>
  
  <p>And ideas?  How can I prevent these emails from going into junk?  We are using an Exchange 2010 server, and Outlook 2007, 2010, or 2013.  Thanks in advance!</p>