sending a PDF mail attachment in iOS7

Alan Stenhouse alanstenhouse at hotmail.com
Wed May 14 06:56:37 EDT 2014


Hi Scott, William

Did you try setting the MIME type for the attachment to "application/pdf" instead of just "pdf"?

i.e.

put "application/pdf" into aAttachments[1]["type"]

Worth a try though I admit that I haven't used this yet (but with other types I have).

HTH

cheers

Alan
 
--
Alan Stenhouse
alanstenhouse at hotmail.com

Check out our apps on the App Store:

BeatSpeak - the multilingual talking metronome
EV-Point - Find your nearest Electric Vehicle Recharge Station.

On 14/05/2014, at 12:00 PM, use-livecode-request at lists.runrev.com wrote:

> 2014-05-13 9:33 GMT+02:00 Scott Morrow <scott at elementarysoftware.com>:
> 
>> 
>> 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





More information about the Use-livecode mailing list