title: Send simple Email ASP.NET MVC, IIS7
body: <p>i'm try to send some simple email to for example test@blabla.com</p>
  
  <p>First of all, I've already tried it in my Localhost, and it worked, the problem was when i uploaded it to my Server</p>
  
  <p>the Server i'm using is windows server 2012 R2, with IIS 7 (not really sure with the version but i believe it's 7 and above)
  hosted successfully with no problem, just the send email method don't work...</p>
  
  <p>I've already add SMTP feature, set the SMTP E-MAIL(Yes, there are no SMTP Virtual server in IIS 7 and above)</p>
  
  <p><strong>here's my controller</strong></p>
  
  <pre><code>public ActionResult SendTestEmail()
  {
      var test_address = "test@blabla.com";
      try
      {
          // Initialize WebMail helper
          WebMail.SmtpServer = "localhost";
          WebMail.SmtpPort = 25;   // Or the port you've been told to use
          WebMail.EnableSsl = false;
          WebMail.UserName = "";
          WebMail.Password = "";
          WebMail.From = "admin@testserver.com"; // random email
  
          WebMail.Send(to: test_address,
              subject: "Test email message",
              body: "This is a debug email message"
          );
      }
      catch (Exception ex)
      {
          ViewBag.errorMessage = ex.Message; // catch error
      }
  
      return View();
  }
  </code></pre>
  
  <p>here is my SMTP E-mail settings:
  <img src="https://i.stack.imgur.com/MJfS4.png" alt="enter image description here"></p>
  
  <p>the error message are: Mailbox unavailable. The server response was: 5.7.1 Unable to relay for test@blabla.com (this happens when i leave the E-mail address textbox empty, this also happens when i've entering any email format such as sample@email.com / my primary e-mail)</p>