setFrom($_POST['from-email'], 'Tester'); // Email From field
// Recipient info
$mail->addAddress($_POST['recipient-email']); // Email To field
$mail->Subject = 'PHPMailer Test'; // Email Subject field
$mail->Body = 'This email has been sent using PHPMailer for test purposes.'; // Email Body field
// Send email report
if(!$mail->send()){
echo 'Message could not be sent.
';
echo 'Mailer Error: ' . $mail->ErrorInfo;
}else{
echo 'Message has been sent.';
}