I am working on a mass mailing of a HTML newsletter with a PDF file attached, and I'm having a really strange problem: the PDF attachment can be seen in all the email clients that I've tried... except iOS 8.4.1. Here are the circumstances:
- The HTML newsletter is built with a Perl script that reads the HTML file, a header image and the PDF file and then constructs the email, using
Mail::Sender
. It attaches the HTML usingmultipart/related
and then attaches the header image as BASE64 and the PDF asquoted-printable
. - The PDF attachment can be seen in Yahoo, Gmail, Outlook and Apple Mail.
- In iOS, the mail appears in the message list with the little paperclip icon that shows that there's an attachment... but when you open the email, the PDF icon doesn't appear anywhere.
- If I try to create an HTML email in Outlook and attach a PDF file by hand, iOS can see the attachment: it shows up at the bottom of the message, as it should.
Reading the source code of both emails (the one created by Outlook and the one created by my Perl script), I can't see any differences. The Outlook message is as follows:
This is a multipart message in MIME format.
------=_NextPart_000_0022_01D13B86.157B65C0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0023_01D13B86.157B65C0"
------=_NextPart_001_0023_01D13B86.157B65C0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
(text skipped)
------=_NextPart_001_0023_01D13B86.157B65C0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
(text skipped)
------=_NextPart_001_0023_01D13B86.157B65C0--
------=_NextPart_000_0022_01D13B86.157B65C0
Content-Type: application/pdf;
name="About SVG Viewer.pdf"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="About SVG Viewer.pdf"
And the other one, the one that's giving me trouble, is:
--xysdmkgfekj_eot34dfgvjdf8u4fmfjkdjke29501
Content-Type: multipart/alternative; boundary="Part-xysdmkgfekj_eot34dfgvjdf8u4fmfjkdjke29501_2"
--Part-xysdmkgfekj_eot34dfgvjdf8u4fmfjkdjke29501_2
Content-type: text/plain
Content-transfer-encoding: 7BIT
(text skipped)
--Part-xysdmkgfekj_eot34dfgvjdf8u4fmfjkdjke29501_2
Content-type: text/html
Content-transfer-encoding: 7BIT
(text skipped)
--Part-xysdmkgfekj_eot34dfgvjdf8u4fmfjkdjke29501_2--
--xysdmkgfekj_eot34dfgvjdf8u4fmfjkdjke29501
Content-type: application/pdf; name="About SVG Viewer.pdf"
Content-transfer-encoding: quoted-printable
Content-disposition: attachment; filename="About SVG Viewer.pdf"
(PDF skipped)
--xysdmkgfekj_eot34dfgvjdf8u4fmfjkdjke29501
Content-type: image/jpeg; name="cabecera.jpg"
Content-description: cabecera
Content-transfer-encoding: base64
Content-disposition: inline; filename="cabecera.jpg";
Content-ID: <cabecera>
What is going on?