Page 1 of 1

Sending a picture as an attachment

Posted: Sat Jun 22, 2013 1:06 pm
by jrarick
Thanks to all in advance.

I understand how to write an app that will send an email - or at least put all the parts together and then it launches the phones email client.

I understand how to use the iphonepickphoto to pick a picture.

What I DO NOT understand is how to use the data/information from that selection(picture) to include it as an attachment in an email.

I have read the ios Release notes 27 times. I am ready to find out that the answer is there - there must be something at a more base level that I do not understand.

Thanks again!

Jack Rarick

Re: Sending a picture as an attachment

Posted: Sat Jun 22, 2013 1:24 pm
by jmburnod
Hi jrarick,

This thread should be useful for you
http://forums.runrev.com/phpBB2/viewtop ... 49&t=15614
Kind regards
Jean-Marc

Re: Sending a picture as an attachment

Posted: Sat Jun 22, 2013 2:51 pm
by jrarick
Thank you - BUT ...

In the code below - how would I find the videopath?? Sorry ... I am so close!

---
put myVideoPath into myData["file"]
put "video/mp4" into myData["type"]
put "File Name" into myData["name"]
mobileComposeMail "My subject", , , , "My body", myData
---

And truly - thanks again!

Jack

Re: Sending a picture as an attachment

Posted: Sat Jun 22, 2013 3:03 pm
by Klaus
Hi Jack,

did you add the video(s) in the standalone builder via "Add files"?
Then you will find it here:
...
put specialfolderpath("engine") & "/name_of_your_video.mp4" into tVideoPath
...
## Or if you have the video in a subfolder:
...
put specialfolderpath("engine") & "/name_of_subfolder/name_of_your_video.mp4" into tVideoPath
...
Lookup "specialfolderpath()" in the ddictionary!


Best

Klaus

Re: Sending a picture as an attachment

Posted: Sat Jun 22, 2013 4:00 pm
by jrarick
I'm sorry!!!

These are not videos - these are pictures that the teacher just took.

Imagine this:

The teacher puts a diagram on a white board that they want ten of their students to see at home.

They take a picture of it with their iPhone camera.

They launch my app and then they want to choose that picture and send it as part of an email (attachment) to their ten students from inside of my app.

Aughh - I'm sorry - I am not a good explainer this morning!!

Jack

Re: Sending a picture as an attachment

Posted: Sun Jun 23, 2013 5:33 am
by Simon
Hi Jack,
So, you have iphonePickPhoto down, the rest is:
put it into tempPhoto

put tempPhoto into myData["file"]
put "image/jpg" into myData["type"]
put "File Name" into myData["name"]
mobileComposeMail "My subject", , , , "My body", myData

Does that work for you?

Simon