title: Sending e-mail by System.Net.Mail.SmtpClient causes 'Mailbox unavailable, Spam Rejected'
body: <p>In a web application using asp.net 4.0, I use the class <code>System.Net.Mail.SmtpClient</code> to send email.</p>
  
  <p>This is my code:</p>
  
  <pre><code>Shared Function InviaMail(ByVal toAddress As String, ByVal TestoMsg As String, ByVal TestoSubject As String) As Boolean
  
      Dim from As New MailAddress("xxx@xxx.pro", "xxx.pro")
      Dim toDest As New MailAddress(toAddress, "")
      Dim mm As New MailMessage(from, toDest)
  
  
      Dim altView As AlternateView
      altView = AlternateView.CreateAlternateViewFromString(TestoMsg, Nothing, MediaTypeNames.Text.Html)
      mm.AlternateViews.Add(altView)
  
      mm.Subject = TestoSubject
      mm.Body = TestoMsg
      mm.IsBodyHtml = True
  
  
      Dim smtp As New SmtpClient
  
      Try
          smtp.Send(mm)
          mm.Dispose()
          mm = Nothing
  
          smtp.Dispose()
          smtp = Nothing
  
          Return True
      Catch ex As Exception
          Return False
      End Try
  End Function
  </code></pre>
  
  <p>For some time now, whenever I try to send an email I get this error:</p>
  
  <pre><code>Mailbox unavailable. The server response was: 5.2.0 Jhw61q00C2SXeFl01 Spam Rejected
  </code></pre>
  
  <p>I searched for hours for a solution, but did not find any information.</p>
  
  <p>Please help me understand what is going on, and why I'm getting this error. If you need more information, I will provide it, but please try to help me.</p>