sending a PDF mail attachment in iOS7

Scott Morrow scott at
Tue May 13 03:33:54 EDT 2014

Using mobileComposeHtmlMail to send a PDF attachment works as expected under iOS 6
but under iOS 7 the email to be sent (in the iOS 7 mail app) has a small box with a question mark instead of the pdf attachment icon (I also tested a text attachment and that seems to display correctly)
There does not appear to be an error during the creation of the pdf and in some cases the mail client on the receiving end displays the pdf attachment. Unfortunately, on some mail clients the pdf fails to show up. I’m wondering if anyone else is seeing this or can suggest what I might be doing incorrectly.
<  LC 6.6.1, 6.6.2 (rc 3) and 6.7 (dp 3) >

-- construct an attachment array
-- tFilePath is the path to a pdf
         put empty into aAttachments -- init
         set the itemDel to SLASH
         put item -1 of tFilePath into tAttachmentName
         set the itemDel to COMMA  -- tidy
         put tFilePath into aAttachments[1]["file"]
         put "pdf" into aAttachments[1]["type"]
         put tAttachmentName into aAttachments[1]["name"]
-- —————————————————————————————————————————
-- assume  tSubject, tToAddress, tCC, tBCC, tBodyAsHTML were previously populated
-- —————————————————————————————————————————
-- send the e-mail
         mobileComposeHtmlMail tSubject, tToAddress, tCC, tBCC, tBodyAsHTML, aAttachments

Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
email     scott at
office     1-800-615-0867

More information about the Use-livecode mailing list