title: Click on button to reply an email in PHP
body: <p>I have a form. When user fills and submits. It will send a mail to department head with an attachment of the form. This email has two buttons 'Approve' &amp; 'Reject'. Now When the manager 'Approves', it should reply with Approval message and an attachment. However when he click on 'Reject', should reply with message 'Rejected'. Below is what I have now.</p>
  
  <p>PHP to send the application to the manager. I am using PHP mailer
  PHP</p>
  
  <pre><code>  $body = file_get_contents('Source/auth.php'); // Authentication Page
    $mail = new PHPMailer();        
    $mail-&gt;IsSMTP(); 
    $mail-&gt;SMTPDebug = 1; 
    $mail-&gt;SMTPAuth = true; 
    $mail-&gt;SMTPSecure = 'ssl';
    $mail-&gt;Host = 'smtp.gmail.com';
    $mail-&gt;Port = 465; // or 465
    $mail-&gt;IsHTML(true);
    $mail-&gt;Username = $_SESSION['member_name'];
    $mail-&gt;Password = $_SESSION['member_password'];
    $mail-&gt;SetFrom($_SESSION['member_name']);
    $mail-&gt;Subject = "Application";
    $mail-&gt;Body = $body;
    $mail-&gt;AddAddress($memail);// Manager of the Department from DB
    $mail-&gt;AddReplyTo($memEmail, "name"); // Reply mail
    $mail-&gt;AddAttachment($_SERVER['DOCUMENT_ROOT'].'/Application/PDF/'.$file.'.pdf');
    $mail-&gt;Send(header ('Location: login_succ.php'));
  </code></pre>
  
  <p>I have created a small Authentication page 'auth.php'; included in the mail by the sender.
  HTML</p>
  
  <pre><code>&lt;form name="form1" method="GET" action="" onSubmit="return verify()"&gt;
      &lt;div&gt;
              &lt;button&gt;Approved&lt;/button&gt; // Reply with approval form as attachment
          &lt;button&gt;Rejected&lt;/button&gt; // Reply 'Rejected'
          &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Is this achievable? I would like to send the application on internet as well as intranet.</p>