mfmailcomposeviewcontroller

Can't sent csv file attachment with mail

余生长醉 提交于 2019-12-04 16:51:25
I have used the MFMailComposeViewController to send the generated report(csv). Now mail is sent to To:email id, & but when i checked the mails i did received the mail but attachment was not there. Then I also tried MailComposer example : https://developer.apple.com/iphone/library/samplecode/MailComposer/index.html in which the png image is attached to mail demo. I also sent mail using that app, But same result image attachment is not delivered. Help, to find what's the problem? Thanks in advance. Here is code in that app : MFMailComposeViewController *picker = [[MFMailComposeViewController

MFMailComposeViewController Not Dismissing From View

岁酱吖の 提交于 2019-12-04 14:09:14
I have the following code that is called when a button on an action sheet is called. But when I press cancel, then delete draft, it just feezes and does not dismiss. I use the same code elsewhere in my app and its called from a select of a tableview cell and it works find there. Any ideas why it isn't working here? Ther is also no error msg in the console when it freezes. if([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [picker setSubject:@"Dr. Chrono Support"]; NSDictionary*

how to add .vcf file as attachment in application iphone

不问归期 提交于 2019-12-04 12:15:33
问题 In my app I want to add .vcf file as attachment in MFMailComposeViewController. 回答1: The documentation for MFMailComposeViewController shows that its addAttachmentData:mimeType:fileName: instance method is the way to go: - (void)addAttachmentData:(NSData*)attachment mimeType:(NSString*)mimeType fileName:(NSString*)filename The attachment is the actual vcf file loaded or transformed into NSData. The mimeType for a vcf is @"text/x-vcard" . The fileName is whatever you want to call it, though

MFMailComposeViewController crashing while dismissModalViewControllerAnimated in iOS5

血红的双手。 提交于 2019-12-04 09:31:33
I am using MFMailComposeViewController in my conde to provide Mail functionality but after sending mail or when i want to cancel mail it will be crashing. below is my code: (IBAction)FnForPlutoSupportEmailButtonPressed:(id)sender { { if ([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init]; mailer.mailComposeDelegate = self; [mailer setSubject:@"Need help from Pluto support team"]; NSArray *toRecipients = [NSArray arrayWithObjects:@"support@myplu.to",nil]; [mailer setToRecipients:toRecipients]; NSString *emailBody = @"";

Preventing MFMailComposeViewController from scaling animated GIFs

为君一笑 提交于 2019-12-04 05:35:29
I'm attaching an animated GIF to an email to be sent with MFMailComposeViewController. If the GIF is of sufficient size the MFMailComposeViewController will ask the user whether they want to resize it to a smaller size. Unfortunately, the animation will not be preserved in the resized image. How do I either forbid MFMailComposeViewController to resize the image or make it preserve the animation? There’s no built-in API to do this, but one option is to compress the animated GIF into a ZIP, then attach that. The MFMailComposeViewController won’t offer to resize the ZIP (unless it’s peeking into

Pushing an MFMailComposeViewController onto the navigation stack? Not presented modally

霸气de小男生 提交于 2019-12-04 03:55:38
问题 I have a table view, and in one of the cells, it says "contact". Upon selecting this cell, I'd like to push in a MFMailComposeViewController. I can only seem to present this MFMailComposeViewController modally. What is the problem here? Thanks! Relevant code frag: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; //*works*//[self.navigationController

UIImageView.Image to mail attachment with MonoTouch

痞子三分冷 提交于 2019-12-04 03:45:31
问题 I am new to MonoTouch and I am trying to send an email with an image as attachment that a user will tame from camera or pick from gallery. I have created the program and it runs correctly (I have an imageview controller which loads an image from uiimagepicker to imageview. Then I call MFMailComposeViewController but I don't know how to pass the image from imageview to addAttachmentdata method. I suppose first I have to save the image from imageview as a file but I don't know how to do it and

New line and returns ignored in setMessageBody

馋奶兔 提交于 2019-12-04 00:31:04
Am I doing something dumb? I can pre-fill and email ok but the "\r\n" is ignored in the emailBody: - (void) sendEventInEmail { MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; NSString *emailSubject = [eventDictionary objectForKey:EVENT_NAME_KEY]; [picker setSubject:emailSubject]; // Fill out the email body text NSString *iTunesLink = @"http://itunes.apple.com/gb/app/whats-on-reading/id347859140?mt=8"; // Link to iTune App link NSString *content = [eventDictionary objectForKey:@"Description"]; NSString *emailBody = [NSString

How to attach CGPDFDocument/CGPDFPage to MFMailComposeViewController

倾然丶 夕夏残阳落幕 提交于 2019-12-03 23:01:39
问题 I have a muti page pdf document stored on local storage. I want to extract any page out of that pdf doc and convert it into NSData to attach it with 'MFMailComposeViewController'. With the following lines of code, I can easily retrive the required page... CGPDFDocumentRef pdfDoc=CGPDFDocumentCreateWithURL(pdfURL); CGPDFPageRef pdfPage = CGPDFDocumentGetPage(pdfDoc, pageNumber); But I am unable to find a way to convert pdfPage into NSData so that I can attach it with mail. NOTE: The

MFMailComposeViewController - change cancel and send button to images

蓝咒 提交于 2019-12-03 20:52:16
I want to customize the MFMailComposeViewController such that it has my custom images/buttons instead of the default "cancel" and "send" buttons. I tried googling for an answer but couldn't find anything that could help me. Any help is really appreciated. Thanks in advance.. You can't change MFMailComposeViewController. Quoting the documentation : Important: The mail composition interface itself is not customizable and must not be modified by your application. 来源: https://stackoverflow.com/questions/13178802/mfmailcomposeviewcontroller-change-cancel-and-send-button-to-images