Prateek Chaubey
Prateek Chaubey

Reputation: 645

How to add email facility in an iPad app?

In my app for iPad I have several videos and pdfs. What I want is when user is watching a video or reading a pdf and if he wants to email that video or pdf to himself or to his friends, then how would he do it? I have added a button on the navigation bar for this purpose. When the user clicks that button an option should appear which should say "Email". now when the user selects Email, the app asks the user to enter an email address. After entering email address the user presses "Send" button. And that particular file is sent to the user's email. How can this be done?

Thanks

Upvotes: 1

Views: 276

Answers (2)

SergGr
SergGr

Reputation: 23788

Take a look at MFMailComposeViewController class. It provides access to standard mail functionality and it includes addAttachmentData:mimeType:fileName: method to add attachments (and you also don't need to present custom UI for e-mail address).

However, if files are big (video), it makes sense to put them somewhere to your server and send only links and in this way avoid sending big attachments. This is important because many mail servers will not allow big attachments (10MB is already big).

Upvotes: 2

Hot Licks
Hot Licks

Reputation: 47729

I'm guessing you'd use MFMailComposeViewController, the same as for iPhone.

Upvotes: 0

Related Questions