Email send on Link Click : I want to send a mail. when some click on my Website Download Link. So How can i do that using PHP and Javascript.

    <form method="post">
                      <div class="form-group">
                          <input type="email" class="form-control" placeholder="Enter Email ID" id="email" onchange="check();" require pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$"/>
                      </div>
                      <div class="form-group">
                        <label style="font-size:14px;"><input type="checkbox" id="toggle"> I agree to receive emails from MarketerBoard. We will not share your any personal information with anyone.</label>
                      </div>
                      <div class="form-group" style="min-height:40px;">
                          <a style="display:none;" href="/images/docs/EMAIL-MARKETING-GUIDE.pdf" name="downloadBtn" download class="mb-button" id="dwn-btn" onchange="check();" onClick="sendmail();">Get your free guide</a>
                      </div>
                  </form>