Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.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 10-03-2009, 07:04 AM   #1 (permalink)
Registered Member
 
vikysaran's Avatar
 
Join Date: Jul 2009
Location: New Delhi
Posts: 129
Default Question On iPhone Mail Composer

I found email composer sample code from iphone OS Ref Library. Here is a code-

Code:
	NSArray *toRecipients = [NSArray arrayWithObject:@"first@example.com"]; 
	NSArray *ccRecipients = [NSArray arrayWithObjects:@"second@example.com", @"third@example.com", nil]; 
	NSArray *bccRecipients = [NSArray arrayWithObject:@"fourth@example.com"];
My question is how to take user's input? Here all email address are predefined in code. so what are the IDs of to, CC, Bcc, subject and body fields?

Rep ASAP
__________________
Thanx & Regards-
Vaibhav Saran | Software Engineer
Neo Sypher Systems Pvt. Ltd.
New Delhi | India
Websites:
http://www.iphonesaura.com/
http://www.apptango.com/

vikysaran is offline   Reply With Quote
Old 10-27-2009, 04:20 AM   #2 (permalink)
Registered Member
 
vikysaran's Avatar
 
Join Date: Jul 2009
Location: New Delhi
Posts: 129
Default

Quote:
Originally Posted by vikysaran View Post
I found email composer sample code from iphone OS Ref Library. Here is a code-

Code:
	NSArray *toRecipients = [NSArray arrayWithObject:@"first@example.com"]; 
	NSArray *ccRecipients = [NSArray arrayWithObjects:@"second@example.com", @"third@example.com", nil]; 
	NSArray *bccRecipients = [NSArray arrayWithObject:@"fourth@example.com"];
My question is how to take user's input? Here all email address are predefined in code. so what are the IDs of to, CC, Bcc, subject and body fields?

Rep ASAP
No replies yet!!!!

anyways i found long description of MF Mail composer in iphone reference library for SDK 3.0 but could not understand how to use predefined methods bellow

methods are-
Code:
 
– setSubject:
- (void)setSubject:(NSString*)subject{
}

 – setToRecipients:
- (void)setToRecipients:(NSArray*)toRecipients{
}

 – setCcRecipients:
- (void)setCcRecipients:(NSArray*)ccRecipients{
}

 – setBccRecipients:
- (void)setBccRecipients:(NSArray*)bccRecipients{
}

 – setMessageBody:isHTML:
- (void)setMessageBody:(NSString*)body isHTML:(BOOL)isHTML{
}

 – addAttachmentData:mimeType:fileName:
- (void)addAttachmentData:(NSData*)attachment mimeType:(NSString*)mimeType fileName:(NSString*)filename{
}
i tried a lot but could not succeeded. Debugger does not goes into these methods on mail client execution.

i think this is the solution for all who wanna use iphone mail client without closing existing application. I will be grateful if anyone will describe this.
__________________
Thanx & Regards-
Vaibhav Saran | Software Engineer
Neo Sypher Systems Pvt. Ltd.
New Delhi | India
Websites:
http://www.iphonesaura.com/
http://www.apptango.com/

vikysaran is offline   Reply With Quote
Old 11-02-2009, 06:23 AM   #3 (permalink)
Registered Member
 
vikysaran's Avatar
 
Join Date: Jul 2009
Location: New Delhi
Posts: 129
Thumbs up

i dont know why but the application working well with mail functionality in real time iPhone whether it responds nothing in Simulator
__________________
Thanx & Regards-
Vaibhav Saran | Software Engineer
Neo Sypher Systems Pvt. Ltd.
New Delhi | India
Websites:
http://www.iphonesaura.com/
http://www.apptango.com/

vikysaran is offline   Reply With Quote
Old 01-10-2010, 09:22 PM   #4 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 36
Default

Aloha vikysaran,

I think all you have to do is simply remove the first@sample.com, second@example.com, etc... from the code. Remember to leave the nil in the message that gets filled by arrayWithObjects, as the last member of the array must be nil.

More to the point, if you start to edit an email but then hit the Cancel button, you are offered the opportunity to save the email. Where does it get saved? I've successfully saved email, according to the message label, but have no clue as to where they are.

iBud
iBud is offline   Reply With Quote
Old 03-03-2010, 04:38 AM   #5 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 31
Default

Hello

Could MF Mail composer be used for sending mail to custom account, not predefined in the Mail application? For example, i want to send a message to a web service which will handle it from there, and the New message screen would look like Apple's new mail. Can this class be used for this purpose?

Thanks!
mistergod is offline   Reply With Quote
Old 03-03-2010, 05:06 AM   #6 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 31
Default

Disregard my previous comment, i just read apple's documentation and it's not possible.
mistergod 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



» Advertisements
» Online Users: 326
21 members and 305 guests
@sandris, ADY, BrianSlick, dacapo, Dani77, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, themathminister, timle8n1, tomtom100, vogueestylee, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,883
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, vvenkatachallam
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:08 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0