Email with Attachment

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
peter_lboro
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Mon Mar 20, 2006 10:32 pm
Contact:

Email with Attachment

Post by peter_lboro » Fri Mar 11, 2011 8:05 pm

I'm writing an app for the iPad that will gather various text inputs from my users. Once they have answered the various questions, I want to email their answers as an attachment (their answers will have been saved to a temporary file on the iPad).

Please can someone tell me how to use revMail to send an email with an attached file.

Thanks for any help.

Peter
--
Peter Reid
Loughborough, UK

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Email with Attachment

Post by Klaus » Fri Mar 11, 2011 10:24 pm

Hi Peter,

I'm afraid this is not (yet) possible on iOS.
Everything that IS possible can be found in the iOS Release Notes.

You can find them in LiveCode: Menu: "Help -> iOS Release Notes
This will open a PDF, look for "Email composition" in that PDF.


Best

Klaus

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Email with Attachment

Post by Dixie » Fri Mar 11, 2011 10:29 pm

Hi...

I don't think revMail will do it for you...
Have a look at http://www.troz.net/rev/index.irev?cate ... ary#stacks ... this might be of help

be well

Dixie

peter_lboro
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Mon Mar 20, 2006 10:32 pm
Contact:

Re: Email with Attachment

Post by peter_lboro » Sat Mar 12, 2011 12:26 am

Hi

Thanks for the responses. OK, if I can't email the results, how does my user get a copy of the saved text file transferred from the iPad to their Mac/PC? It's not obvious to me how you're supposed to transfer ordinary files to/from iPad/Mac.

Thanks again.

Peter
--
Peter Reid
Loughborough, UK

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Email with Attachment

Post by Klaus » Sat Mar 12, 2011 1:13 pm

Hi Peter,

you are talking about a text file, can't you just include the CONTENT of that file in the mail body? 8)


Best

Klaus

peter_lboro
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Mon Mar 20, 2006 10:32 pm
Contact:

Re: Email with Attachment

Post by peter_lboro » Sat Mar 12, 2011 4:32 pm

Hi Klaus,

You're right I could do that except that the file contains tab-delimited data for uploading into Excel and my users will not want to save an email body and then edit it to remove intro and tail material to leave the clean tab-delimited stuff!

Actually I'm struggling to see how I can use text files generally. I'd like to upload control files and download results files from a known area on the iPad, such as the special Documents folder. For example, my app will be used to present a number of different forms and the idea is that the form content is contained in 3 control files (the questions in one file and two different picking lists in the other two files) which are then used during the preopenstack handler to build the actual form elements on screen. For testing purposes I have the control files in the same folder as the app when running as a Mac app and in the iPad simulator's special Documents folder when running in the simulator. However, I don't see how I can upload these 3 control files into the special documents area or get results files back again from there with an actual iPad. I was thinking of using the email as a way of getting the results back out again, but wasn't sure how I'd get the control files uploaded to start with!

Some simple form of file transfer into and from the iPad must be supported somehow, perhaps not in the current LiveCode release, but at some point?!

Thanks again.

Best regards

Peter
--
Peter Reid
Loughborough, UK

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Email with Attachment

Post by Klaus » Sat Mar 12, 2011 5:34 pm

Hi Peter,

ah, I see, well in that case...

Question is, how do you get files from the iPad to your desktop machine in general except via mail?
I have no idea actually!? :lol:

Quick idea, only feasible if you have a server you can access:
Upload the file to your server, maybe use "the seconds" for the filename
(poor mans UUID ;-), and supply a link in your email body text?

Best

Klaus

peter_lboro
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Mon Mar 20, 2006 10:32 pm
Contact:

Re: Email with Attachment

Post by peter_lboro » Sat Mar 12, 2011 5:47 pm

Hi Klaus

Nice idea except that I don't have a server that I can use for this. Also, the iPads will be used in a variety of geographic locations without guaranteed Internet access, but with access to a Mac laptop in the evenings, when the file transfers would take place, hopefully via a direct link between the iPad and the laptop.

Looks like I'll have to raise the general issue of file transfer to/from the iPad with others elsewhere on the forum.

Thanks again for your response and interest.

Best regards

Peter
--
Peter Reid
Loughborough, UK

hliljegren
Posts: 111
Joined: Sun Aug 23, 2009 7:48 am
Contact:

Re: Email with Attachment

Post by hliljegren » Sun Mar 13, 2011 8:37 pm

Hi Peter!

You could use the "File Sharing" button in the iOS tab of the "Stand alone" dialog. Obleo Beck has a nice tutorial on http://intkeystrokes.posterous.com/ It's actually just a click away!
___________________________________
MacBook Pro M1 MAX 64 Gb,
LiveCode 10.0.1rc3

peter_lboro
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Mon Mar 20, 2006 10:32 pm
Contact:

Re: Email with Attachment

Post by peter_lboro » Mon Mar 14, 2011 12:10 am

Thanks very much for the info, it's just what I was looking for!

Best regards

Peter
--
Peter Reid
Loughborough, UK

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Email with Attachment

Post by Klaus » Mon Mar 14, 2011 2:34 pm

Wow, wonderful and very handy hint!
Thanks a lot!

Post Reply