Adding attachments to mailto?

7 views
Skip to first unread message

Gerald Buckley

unread,
Dec 19, 2009, 11:10:26 AM12/19/09
to iPhoneWebDev
Is there any sanctioned method of adding a non-photo attachment to an
email from within a web app?

Have seen several previous inquiries about this with no joy. That was
a year+ ago though and much has changed since.

I've seen several apps create an email which has been passed hrefs as
an array of variables... but nothing that will add a PDF or even a
simple .txt file.

Any apps or web apps out there doing this (commercial or otherwise)?

~Gerald

Maximilian Melcher

unread,
Dec 19, 2009, 11:39:14 AM12/19/09
to iphone...@googlegroups.com
Hello,

I havent tested it but I think webapps cant do it. Safari is too
restricted for that (in some cases this is fine in others its not). I
think even native apps cant access these files because they are stored
in mails and thats a big privacy issue - but I could be wrong ;)

Cheers
Max

> --
>
> You received this message because you are subscribed to the Google
> Groups "iPhoneWebDev" group.
> To post to this group, send email to iphone...@googlegroups.com.
> To unsubscribe from this group, send email to iphonewebdev...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en
> .
>
>

Gerald Buckley

unread,
Dec 19, 2009, 11:50:35 AM12/19/09
to iPhoneWebDev
Thanks Max.

I can't help but think I've seen a native commercial app that put
pictures in a mailto. These were pictures that were NOT in my photo
album... But, I can't tell you if they were called as img src and made
to appear as inline elements of the email message.

OK, so, getting creative... what if each "button" in my web app was
actually a "submit" for a form and each click on the graphic button
submitted a web form and the emailed attachment came from my site...
Could something like that work? (Suspecting so...)

Question is, could I do something like that from within a wrappered
app (such as PhoneGap or Titanium, etc) and still be "approved" for
the App Store?

New thoughts out there?

Mark Tomlin

unread,
Dec 19, 2009, 6:40:56 PM12/19/09
to iphone...@googlegroups.com
How about base64 encoding the image in the URL?

Sent from iPhone, please forgive spelling mistakes.

Remi Grumeau

unread,
Dec 19, 2009, 10:03:54 PM12/19/09
to iphone...@googlegroups.com
Actually, the only real solution you have is a PHP script, launch via a form or a button, that send a mail using the mail() function with a HTML template, using images hosted online.

Remi

Gerald Buckley

unread,
Dec 21, 2009, 9:43:20 AM12/21/09
to iPhoneWebDev
Erica Sadun's Chapter 07 > Recipe 07 shows how to pick an image from
the onboard Photo Album and attach it to an email.

What's interesting here is the mail app isn't loaded on the iPhone
Simulator... yet it pops a mail message view
[MFMailComposeViewController ].

So, now my question becomes this... If we can pluck things out of
Photo Album... might we be able to pluck things out of a local db (be
it HTML5 or sqlite). So long as we know the path to the items...
should it be possible?

Gerald Buckley

unread,
Dec 22, 2009, 10:03:04 PM12/22/09
to iPhoneWebDev
Better still is Apple's own sample project called "MailComposer"...
Turns out adding attachments from inside your own project is pretty
trivial stuff. Who knew!? :)
Reply all
Reply to author
Forward
0 new messages