tags:

views:

285

answers:

1

I am using the MFMailComposeViewController in 3.0 to send an email with attachment etc. inside my app. I would like the "To:" address to be defaulted to the default account/address on the device. How can I access this address to place it into a string for the setToRecipients?

Essentially, I'm going to let the user send an email to themselves (as the default "To") with an attachment inside the app.

+1  A: 

The API doesn't expose that information publicly (for probably good reasons, such as preventing developers from harvesting iPhone users' email addresses).

You should probably go about asking for the user's email address and then saving it for future use.

Neil Daniels
Thats weird considering you can get email addresses of contacts in the address book
Surya