title: There is an error for email sending using Webmail function
body: <p>I got this error</p>
  
  <blockquote>
    <p>The parameter 'addresses' cannot be an empty string. Parameter name:
    addresses Description: An unhandled exception occurred during the
    execution of the current web request. Please review the stack trace
    for more information about the error and where it originated in the
    code. </p>
    
    <p>Exception Details: System.ArgumentException: The parameter 'addresses'
    cannot be an empty string. Parameter name: addresses</p>
  </blockquote>
  
  <p>I tried all emails but it is not working.</p>
  
  <p><strong>HomeController.cs</strong></p>
  
  <pre><code>[HttpPost]
  public ActionResult Contact(Registration reg)
  {
      if (ModelState.IsValid)
      {
          WebMail.Send(""
                      , reg.Name + "is",
                       reg.Message + "&lt;br&gt;&lt;/br&gt; My Number : "+reg.Mobile+
     "&lt;br&gt;&lt;/br&gt; My email is "    +reg.Email
                                      ,null
                                      ,null
                                      ,null       
                                      ,true
                                      ,null
                                      ,null
                                      ,null
                                      ,null
                                      ,null
                                      ,reg.Email);
      }
  
      return View();
  }
  </code></pre>
  
  <p><strong>Web.config</strong></p>
  
  <pre><code>&lt;system.net&gt;
  &lt;mailSettings&gt;
    &lt;smtp&gt;  
      &lt;network host="smtp.gmail.com"
               port="587"         
               userName=""
               password=""
               enableSsl="true"
               /&gt;
    &lt;/smtp&gt;
  &lt;/mailSettings&gt;      
  &lt;/system.net&gt;  
  </code></pre>
  
  <p><strong>Contact.cshtml</strong></p>
  
  <pre><code>@using (Html.BeginForm())
  {
  &lt;p&gt;Name: @Html.TextBoxFor(model =&gt; model.Name)&lt;/p&gt;
  &lt;p&gt;Email: @Html.TextBoxFor(model =&gt; model.Email)&lt;/p&gt;
  &lt;p&gt;Mobile: @Html.TextBoxFor(model =&gt; model.Mobile)&lt;/p&gt;
  &lt;p&gt;Message:&lt;/p&gt;
  &lt;p&gt;@Html.TextAreaFor(model =&gt; model.Message)&lt;/p&gt;
  &lt;p&gt;
      &lt;input type="submit" value="Submit" /&gt;
  &lt;/p&gt;
  }    
  </code></pre>
  
  <p>even though i put all email, it was not working.</p>