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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:18:07+00:00 2026-06-03T09:18:07+00:00

Hello all and thanks for your time. I believe I have a simple question.

  • 0

Hello all and thanks for your time. I believe I have a simple question.

I am trying to strip the string email body of it’s quote marks (they seem to come from getting the getting my body from a dictionary) and pass it to MailObject….with no luck I keep getting SIGBRT on my *finalString line.
What am I missing. Thanks again for any help.

NSMutableDictionary *my_data = [myMasterOrderList objectAtIndex:[self.tableView indexPathForCell:cell].row];
   NSMutableArray   *toEmail = [[NSMutableArray alloc] init];
   [toEmail addObject:[my_data objectForKey:@"repemail"]];

   NSMutableString *toBody = [my_data objectForKey:@"myOrder"];
  // [toBody addObject:[my_data objectForKey:@"myOrder"]];
  // NSString *finalSting = [[NSString alloc] init];
   NSMutableString *finalString = [NSMutableString stringWithFormat:@"%@",[toBody stringByReplacingOccurrencesOfString:@"\"" withString:@"%20"]];

   NSLog(@" toBody my_data%@", finalString);
//*************  SEND MAIL *************
   if ([MFMailComposeViewController canSendMail]) {

       MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init];
       mailViewController.mailComposeDelegate = self;
       [mailViewController setToRecipients:toEmail];
       [mailViewController setSubject:@"Sub Goes Here."];
       [mailViewController setMessageBody:finalString isHTML:NO];

       [self presentModalViewController:mailViewController animated:YES];
  • 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-06-03T09:18:08+00:00Added an answer on June 3, 2026 at 9:18 am

    I tested this code:

    NSString *toBody = @"this \" is my \" body \" email\"";
    NSMutableString *finalString = [NSMutableString stringWithFormat:@"%@",[toBody stringByReplacingOccurrencesOfString:@"\"" withString:@"%20"]];
    NSLog(@"%@", finalString);
    

    The output of the NSLog is:

    2012-05-07 19:44:04.157 StringTesting[19203:f803] this %20 is my %20 body %20 email%20
    

    I actually copied your code to use. I know it sounds basic, but since mine worked, have you tried restarting Xcode and/or rebooting your machine, cleaning your project, etc…?

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

Sidebar

Related Questions

Hello all and thanks for your time. I would like to know How I
Hello all and thanks for your time reading this. I need to verify certificates
Hello and thanks for your time! While trying to implement the Form Wizard I
Thank you all for your answers and time! Hello, I've been trying to call
I have a string, Hello there I have a question I want to delete
Hello all I have a simple Spring application which will not end as there
Hello and thanks for your time, I am creating an application that moves video
Hello all Thanks for your previous replies hey i am unable to install the
Hello and thanks in advance for your help. I have a treeview that is
hello all I have a small dialog which I created dynamically, which has a

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.