Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-29-2009, 09:55 AM   #1 (permalink)
Creator Of iLambo
 
IphoneSdk's Avatar
 
Join Date: Sep 2009
Location: Scarborough, United Kingdom
Age: 14
Posts: 408
Default Let user choose who to send email to

Hi,

I want to let the user choose who they want to an email to from my app

To send an email to a certain email address I use this code:

Code:
NSURL *url = [[NSURL alloc] initWithString:@"mailto:k@yahoo.com?subject=This is my subject&body=this is the body"];
[[UIApplication sharedApplication] openURL:url];
In the email that will be sent I want there to be data that the user has typed into a text field in the app.

Any ideas how to do this?

I hope I've explained it properly!

Thanks
__________________
My App:

iLambo - The best in Lamborghini Images and Videos.

Car Dodge - See how many cars you can dodge!

<-- If I've helped you out... Buy my app or simply email me for a promo code, then review and rate it!

Last edited by IphoneSdk; 11-29-2009 at 09:58 AM.
IphoneSdk is offline   Reply With Quote
Old 11-30-2009, 12:33 AM   #2 (permalink)
David Porter Apps
 
bobbypage's Avatar
 
Join Date: Aug 2009
Posts: 53
Default

Try using the MessageUI.Framework. It should work for your case. Just set the Message to your text field. For a jump start on using the messageui.framework go here.
Using OpenURL (like you are now) to email, works great for just sending an email and specifying a sender though, if you want anymore functionality, (like you do in your case) give MessageUI a run.
Hope I helped,
-David
__________________
Check out my website/blog: http://www.davidporterapps.com

Follow Me on Twitter:
http://twitter.com/bobbypage
bobbypage is offline   Reply With Quote
Old 11-30-2009, 12:36 AM   #3 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 2,565
Default

If you're targeting 2.0 you can stick with mailto: - just leave off the email address, but keep the mailto:?subject=blah+blah+blah

Code:
NSURL *url = [[NSURL alloc] initWithString:@"mailto:?subject=This is my subject&body=this is the body"];
[[UIApplication sharedApplication] openURL:url];
__________________
smasher is offline   Reply With Quote
Old 11-30-2009, 11:06 AM   #4 (permalink)
Creator Of iLambo
 
IphoneSdk's Avatar
 
Join Date: Sep 2009
Location: Scarborough, United Kingdom
Age: 14
Posts: 408
Default

Ok, thanks for both of your help!
__________________
My App:

iLambo - The best in Lamborghini Images and Videos.

Car Dodge - See how many cars you can dodge!

<-- If I've helped you out... Buy my app or simply email me for a promo code, then review and rate it!
IphoneSdk is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,145
Threads: 38,923
Posts: 170,776
Top Poster: smasher (2,565)
Welcome to our newest member, user314159
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:37 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0