title: Send a mail in mvc 3
body: <p>A question regarding send mail in mvc 3.</p>
  
  <p>When I click on <code>btnApply</code> it should send 2 emails to <code>abcd@gmail.com</code> and also send an acknowledgement to (who filled email id in apply form like be <code>123@gmail.com</code>)</p>
  
  <p>For example:</p>
  
  <ul>
  <li><strong>Email1</strong> : <code>xyz@gamail.com</code></li>
  <li><strong>Email2</strong> : <code>abcd@gmail.com</code></li>
  <li><strong>Email3</strong> : email entered in apply form, e.g <code>123@gmail.com</code></li>
  </ul>
  
  <p>when a <strong>Email3</strong> click apply send mail from <strong>Email1(Sender)</strong> to <strong>Email2(receiver)</strong> &amp; <strong>Email3(receiver)</strong></p>
  
  <p><strong>or</strong></p>
  
  <p>when a <strong>Email3</strong> click apply send mail from <strong>Email2(Sender)</strong> to <strong>Email2(receiver)</strong> &amp; <strong>Email3(receiver)</strong> </p>
  
  <ol>
  <li><p>I have form in popup:</p>
  
  <pre><code> @using (Html.BeginForm()){
   Your Full Name
      &lt;input type="text" value="" id="txtname" name="txtname" required /&gt;
      Your Email          
      &lt;input type="email" value="" id="txtemail" name="txtemail"  required /&gt;    
      Upload Your Resume
      &lt;input name="Upload Saved Replay" id="btnFile" type="file" /&gt;
      &lt;input type="button" id="btnApply" name="btnApply" value="Apply" /&gt;
  }
  </code></pre></li>
  <li><p>I have a email manager, it only send 1 mail that from  xyz@gmail.com to email id that specified in apply form (123@gmail.com )
  </p>
  
  <pre><code>public class EmailManager
  {
      private const string EmailFrom = "xyz@gmail.com";
      public static void Enquiry( int JobId, string UserName, string Email, string Massage)
      {
          using (var client = new SmtpClient()) {
              using (var message = new MailMessage(EmailFrom, Email)) {
                  message.Subject = "Successful";
                  message.Body = "&lt;html&gt;&lt;head&gt;&lt;meta content=\"text/html; charset=utf-8\" /&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;Dear " + UserName +
                      ", &lt;/p&gt; &lt;p&gt;Thankyou for Registering&lt;/p&gt;"
                      + "&lt;/a&gt;&lt;/p&gt;&lt;div&gt;Best regards,&lt;/div&gt;&lt;div&gt;Nisha&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;";
                  message.IsBodyHtml = true;
                  client.EnableSsl = true;
                  client.Send(message);
              };
          };
      }
  }
  </code></pre></li>
  </ol>