Page 1 of 1

e-mail attachment from mobile app

Posted: Mon Sep 23, 2013 3:21 pm
by Traxgeek
Hi, I've searched and searched and am just more confused than before I started :x

I'm writing an app and wish it to be truly cross platform (it's my first LC app - so probably not the best move)...

I'm coding and using a Mac, I have a Windows XP platform and both an older iPad and recent Android tablet available to me for testing.
Generally, I'm getting there, I find I have lots of "if platform = ..." statements everywhere I try to do something apart from manipulating data and displaying the results... but, like, I say, I'm making progress.

My final hurdle for this app (before trying to deploy it anything other than the Mac or the PC) is to be able to -1-get my data out of the app (to back it up) and -2-get the data created on a.n. other platform back into my app.

OK, I can collect my data files and zip them up within LC - no worries there - but how to e-mail this zip file as an attachment ?
There are many references and examples with LC, StackOverflow and this forum BUT I'm confused as to best place to start when I know right now that I want compatibility across all 4 platforms. I have no problems using the various platforms' e-mail client/handling 'server' (I'm not desperate to create my own - if it's not necessary) but I am very keen on putting my best foot forward from the start and not ending up with multiple messy code blocks to handle each platform individually when it might not be necessary - I enjoy learning but I'd just prefer to keep my 'dead-ends' to a minimum on the way :)

I guess this has been done many times before and I wondered if someone would shed some light on simply where to start (and maybe why).

Thanks a million.

Re: e-mail attachment from mobile app

Posted: Tue Sep 24, 2013 1:06 am
by Simon
I take it you've seen mobileComposeMail?

Simon

Re: e-mail attachment from mobile app

Posted: Tue Sep 24, 2013 6:49 am
by Traxgeek
Hi Simon,

Thanks. Yes, seen and noted but I don't think that will help me with the Mac and PC platforms.
To be fair, I've read up on lots including rolling my own, Sarah's SMTP server script, html email tutorials.... but I remain confused as to the best way to start...

I'll go read up more on the mobileComposeMail with regards sending e-mails with binary attachments for the Android and iOS platforms.

I assumed my requirement to be far from unique and thought maybe there was a 'proven' / 'tried and tested' method that someone had already found to limit the coding / make it slick (lean and mean !) As opposed to a load of odd-job snippets cobbled together...

I'll revert once I've got something going...

Regards.

Re: e-mail attachment from mobile app

Posted: Tue Sep 24, 2013 7:00 am
by Simon
yeah, it would be cool "one command fits all" but I haven't seen it yet.
Given time it will happen. For now I think you have to use Sarah's or Shaosean's stuff.
I haven't seen others posting 4 solutions here.

Simon

Re: e-mail attachment from mobile app

Posted: Sat Oct 05, 2013 11:35 am
by Traxgeek
Hi again,

This has been a while and whilst I have been able to finalise the mobile e-mail sending with attachments (to a degree) I am still at a loss as to where to begin for desktop (Mac OSX and WindowsPC).

I think I've read and read and re-read my options but they seem to focus on 'revMail' and 'revMailUnicode', neither of which (as far as I can ascertain) will enable the attaching of one (or more - but, 1 would do) attachment(s).


Desktop/Mobile
revMail : supported by OSX, Windows, Linux, iOS and Android - no support for attachments - OSX returns ? - Windows returns ? - iOS returns n/c, cancel, saved, sent, failed - Android returns Unknown
revMailUnicode : OSX, Windows, Linux - no mobile support - no support for attachments - OSX returns ? - Windows returns ? - Linux returns ? -

Mobile
mobileComposeMail : supported by iOS, Android - mobile only - support for attachments - returns (platform(s) not specified) sent, cancel
mobileComposeHTMLMail : supported by iOS, Android - mobile only - support for attachments - returns (platform(s) not specified) sent, cancel
mobileComposeUnicodeMail : supported by iOS, Android - mobile only - support for attachments - iOS returns sent, cancel - Android returns unknown

Just all seems a little haphazard / random to me. Am I missing something really basic / simple ? After a while, confusion sets in and... :?

I've read up on Sarah's stack and the Rev/LC help. It seems (to me) that one can't use out-of-the-box standard vanilla LC - so, if sending an attachment is required, then one needs to use Sarah's stack or 'Thunderbird' from Mozilla as some sort of external / add-on. But...

Is there really no 'simple', inbuilt / internal to LC way to attach a file to an e-mail and send it or at least pass the attachment(s) out to the default system e-mail app ? It seems such a basic requirement that I feel I surely must be missing something. I'm not suggesting that there should be / is (well, maybe should be... ;-) ) a one-fit / 'standard' module but... is this really THAT difficult... it seems a little like some (key scary 'X'-files music) voodoo magic is required...

How have others achieved this ? I am soooooooo lost...

Is someone willing / able to share their experience with this and generally kick me in the right direction please ?

Thanks a million.

Re: e-mail attachment from mobile app

Posted: Sat Oct 05, 2013 6:22 pm
by Simon
Hi Traxgeek,
You've got mobile covered (good) for desktop I have used php to send emails, this avoided platform types, email clients etc.
I haven't done it with attachments but I'm sure there is a way.
Here is a forum posting on the subject:
http://forums.runrev.com/phpBB2/viewtop ... =7&t=15906
It looks like they got it to work in the end.

Simon
Edit: I agree! There should be a simple liveCode method of sending emails with attachments.

Re: e-mail attachment from mobile app

Posted: Sun Oct 06, 2013 8:54 am
by Traxgeek
Thanks Simon,

I seem to have spent days on this, what I thought was going to be, pretty simple task. Granted 90% of my time has been on setting up and gluing the UI together etc but... to stumble on, what I thought would be, the simplest part (desktop e-mail send) is a real downer !

I understand the issues interfacing with iOS and Android mobile server components but... with desktop ?? (big sigh).
Like I said, I don't have an issue (for now / this app anyways) on using the platforms' default mail servers but not even having simple access to this functionality with attachments leaves me... :?

Anyway, (please excuse my 'rant' - well, I was building up to one ! - out of sheer frustration) thanks for your link and support, I'll go play / continue. Although I have never played with PHP and at the moment have no idea as to how to incorporate it into LC... but... onward and upward...

Thanks again. Have a great weekend.

Regards (from sunny France)