I’m trying to send an email using PHPMailer in PHP that includes an S/MIME encrypted file (smime.p7m) as an attachment. The email should have:
MIME-Version: 1.0
Content-Disposition: attachment; filename=”smime.p7m”
Content-Type: application/x-pkcs7-mime; smime-type=enveloped-data; name=”smime.p7m”
Content-Transfer-Encoding: base64
I want the email body to remain empty (no text/html content). How can I correctly configure PHPMailer to send this type of email with just the encrypted attachment?
I’ve tried using addAttachment() and setting $mail->Body = ”
Any guidance or examples would be appreciated.