Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7184977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:18:48+00:00 2026-05-28T18:18:48+00:00

I have searched around the internet and stack and have not quite found the

  • 0

I have searched around the internet and stack and have not quite found the right answer for my conditions. ( Xcode 4.2, iOS 5, ARC, LLDB, Storyboard, Universal App )

Looking for the method to allow users the option to select a photo to add to the email.

I want to keep it non-obtrusive and add a button within MFMailComposeViewController that allows users to add a photo from their photo library or take a photo with their camera.

I tried to using a button to viewController with UIImpagePicker and Camera on view controller that added image to UIImageView with a separate mail function button, but this was overkill and clutter the app unnecessarily, I also was unable to figure out the to code to insert the chosen photo into the email.

My inapp email works perfectly, here is the code

.h

#import <MessageUI/MessageUI>
<MFMailComposeViewControllerDelegate>

.m

- (IBAction)Email:(id)sender 
{
    if ([MFMailComposeViewController canSendMail]) {
        MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init];        
        mail.mailComposeDelegate = self;

        [mail setSubject:@"Feedback"];

        NSArray *toRecipients = [NSArray arrayWithObjects:@"feedback", nil];
        [mail setToRecipients:toRecipients];

        NSString *emailBody = @"-Your Message Here-";
        [mail setMessageBody:emailBody isHTML:NO];

        mail.modalPresentationStyle = UIModalPresentationPageSheet;

        [self presentModalViewController:mail animated:YES];

    } else {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error:" 
                                                        message:@"E-mail is not supported on your device."
                                                       delegate:nil 
                                              cancelButtonTitle:@"Cancel"
                                              otherButtonTitles:nil];
        [alert show];
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:18:50+00:00Added an answer on May 28, 2026 at 6:18 pm

    The mail composer doesn’t offer the ability to add user selected photos itself and adding controls to the composer view controller isn’t recommended.
    You’ll have to make the user choose the photo first using UIImagePickerController and then add it as an attachment when you present the mail composer.

    The question is not how to code it, but rather how to design the UI. Maybe you could make it a little bit like the twitter app handles various attachment and additional information.

    Fabian

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched around a bit, and have not really found a professional type
I have searched the forum and have not found an issue similar to this.
I have searched around and found some tutorials for xsl:key and key() function, but
I have searched around for an answer to this but can't find one. When
I have searched around but not gotten much help. Here's my problem. I want
I have searched around and cannot find an answer. Say I have a list
I've been looking around the internet and haven't found out how, but have found
I have searched around for possible answers, but did not find one that came
Thou it is simple, I have searched this around the internet and I couldn't
I have searched around for a while, but surprised that no one ever popped

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.