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 5991613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:24:45+00:00 2026-05-22T23:24:45+00:00

I have this piece of code for MFMailComposer working fine in the simulator and

  • 0

I have this piece of code for MFMailComposer working fine in the simulator and iPhone 4, but it crashes on 3GS. What is the reason and what is the way to resolve it?

I checked it with breakpoints. mailPicker is not allocated with memory.

    MFMailComposeViewController *mailPicker = [[MFMailComposeViewController alloc] init];
mailPicker.mailComposeDelegate = self;

// Set the subject of email
[mailPicker setSubject:@"Somebody got place in my sh*t list"];
NSString *emailBody = @"I just added somebody to my s**t list";

// This is not an HTML formatted email
[mailPicker setMessageBody:emailBody isHTML:NO];

// Create NSData object as PNG image data from camera image
NSData *data = UIImagePNGRepresentation([self captureScreen]);

// Attach image data to the email
// 'CameraImage.png' is the file name that will be attached to the email
[mailPicker addAttachmentData:data mimeType:@"image/png" fileName:@"CameraImage"];

// Show email view 
[self presentModalViewController:mailPicker animated:YES];

// Release picker

[mailPicker release];
  • 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-22T23:24:46+00:00Added an answer on May 22, 2026 at 11:24 pm

    If at least one email account is enabled on the device, the following call should return YES:

    [MFMailComposeViewController canSendMail]

    Conversely, if all accounts are disabled/removed, it will return NO.

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

Sidebar

Related Questions

I have this piece of code that is working but is kind of cumbersome.
I have this piece of code, but can't seem to get it working. success:
I have this piece of code (summarized)... AnsiString working(AnsiString format,...) { va_list argptr; AnsiString
I have this piece of code that works fine in subsonic 2.2, I migrated
I have this piece of code I'm trying to get to display but no
I have this piece of code in my routine but it doesnt seem to
I have this piece of code: <input type=text name=desc id=desc onchange=OnDescChange(); /> but it
I have this piece of code, but the values may change while someone is
I have this piece of code #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h>
I have this piece of code: $(#faq).click(function () { var url = $.get(faq, {

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.