I have recently started using the phpMailer class for all my forms. My script still uses php's mail();
function.
I would like to start encrypting the emails I get from the contact form and the file that is uploaded and attached from the same form.
I have been researching using openssl_pkcs7_encrypt();
and S/MIME
but am not sure if 1. Either option will work in this situation and 2. is one easier to implement
Below is the phpMailer class script I have running now.
$mail = new PHPMailer();
$mail->AddAttachment($path_of_uploaded_file);
echo $path_of_uploaded_file;
$mail->IsMail();
$mail->AddReplyTo($_POST['email'], $_POST['name']);
$mail->AddAddress($emailAddress);
$mail->SetFrom($_POST['email'], $_POST['name']);
$mail->Subject = "Contact Request from ".$_POST['name']." | ". $current_date;
$mail->MsgHTML($msg);
$mail->Send();