任何人都可以解释如何加密具有多个附件的mime邮件,可读取Outlook吗?我目前构建一个多部分邮件,由Outlook正确读取,但如果我使用openssl_pkcs7_encrypt()加密那个multipart-headers +正文,Outlook只会读取(html)-body并且无法分离附件。然后它将第一个附件说成不可读。
结构是
To: you@example.com From: me@example.com Reply-To: me@example.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="mx-2041315b16859f651fe7575c5949d1aa" This is a multi-part message in MIME format --mx-2041315b16859f651fe7575c5949d1aa Content-Type: multipart/related; boundary="rel-2041315b16859f651fe7575c5949d1aa"; --rel-2041315b16859f651fe7575c5949d1aa Content-Type: text/html; charset=UTF-8; [html-content here...] --rel-2041315b16859f651fe7575c5949d1aa Content-Type: image/jpg; name="Image.jpg" Content-ID: img1 Content-Disposition: inline; filename="Image.jpg" Content-Transfer-Encoding: base64 [related base64-encoded JPEG...] --rel-2041315b16859f651fe7575c5949d1aa --mx-2041315b16859f651fe7575c5949d1aa Content-Type: application/octet-stream; name="A_PDF.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="A_PDF.pdf" [base64-encoded PDF...] --mx-2041315b16859f651fe7575c5949d1aa