mfmailcomposeviewcontroller

MFMailComposerViewController via UIActivityViewController error

我是研究僧i 提交于 2019-12-07 03:28:52
问题 I'm trying to open a mail composer via UIActivityViewController on iOS8. (So, there's no my own code for this procedure) The result on device is continues error logging (the messages continue to be logged even after I close mail and quit to different UI controller) AX Exchange error: Error Domain=Accessibility Code=0 "Remote service does not respond to _accessibilityMachPort" UserInfo=0x14fd1b60 {NSLocalizedDescription=Remote service does not respond to _accessibilityMachPort} On a simulator

SwiftUI: Send email

◇◆丶佛笑我妖孽 提交于 2019-12-07 03:10:20
问题 In a normal UIViewController in Swift, I use this code to send a mail. let mailComposeViewController = configuredMailComposeViewController() mailComposeViewController.navigationItem.leftBarButtonItem?.style = .plain mailComposeViewController.navigationItem.rightBarButtonItem?.style = .plain mailComposeViewController.navigationBar.tintColor = UIColor.white if MFMailComposeViewController.canSendMail() { self.present(mailComposeViewController, animated: true, completion: nil) } else { self

Attaching .txt to MFMailComposeViewController

纵然是瞬间 提交于 2019-12-06 18:40:44
问题 I have a .txt file stored in Documents Folder and I want to send it by MFMailComposeViewController with next code in the body of -sendEmail method: NSData *txtData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"dataBase" ofType:@"txt"]]; [mail addAttachmentData:txtData mimeType:@"text/plain" fileName:[NSString stringWithFormat:@"dataBase.txt"]]; When Mail composer appears I can see attachment in the mail body but I receive this mail without attachment. Maybe it is

Is it possible to go back automatically into the application after calling a Number?

别等时光非礼了梦想. 提交于 2019-12-06 16:06:04
In my application I have some phone numbers, so that the users can call the numbers. When the users tap the numbers it push them out of the application to call the number they tapped. What I want is that the application should get the users back to the application after that the conversation is finished. In Mailing mode you can use MFMailComposeController , and then switch back to the previous view. So When you use the MFMailComposeController You never get out of the application. public override void ViewDidLoad () { base.ViewDidLoad (); //Call A number</i> this.buttonCall.TouchUpInside +=

Attaching plain text file using MFMailComposer in iPhone SDK

拟墨画扇 提交于 2019-12-06 13:36:52
I've been trying to use MFMailComposer to send a text file with encrypted data within. The problem is my attachment never shows up when when the email arrives in the inbox. Instead, a line of " <br/><br/> " is always present. I'm assuming is has something to do with the mime type and the receivers mail server not know how to read the data but I just can't figure out a solution. Anyone come across this before and have a solution? if([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init]; mailController

Sending Email using mailto: URLs

爱⌒轻易说出口 提交于 2019-12-06 11:45:13
Can someone help me with the following code? For sending email in iOS, is the below code a good one or should I use the MFMailComposeViewController than this?: NSString *url = [NSString stringWithString: @"mailto:foo@example.com?cc=bar@example.com&subject=Greetings%20from%20Cupertino!&body=Wish%20you%20were%20here!"]; [[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];NSString *url = [NSString stringWithString: @"mailto:foo@example.com?cc=bar@example.com&subject=Greetings%20from%20Cupertino!&body=Wish%20you%20were%20here!"]; [[UIApplication sharedApplication] openURL:

Alternative ways to send email without UI from ipad or iphone

旧巷老猫 提交于 2019-12-06 11:12:40
I see there are many ways to send email in the background (without UI) in iOS devices and without using MFMailComposeViewController class. Most popular examples are fill an online form and press submit button. Here are the most popular methods i see in stackoverflow.. (1) Using your own SMTP client. This approach is working for me but in my private network but not working in my company premises as in company network I am not allowed to use gmail (public emails) and don't have SMTP details of our company mail server. I am struck here in this approach. (2) Using CTCoreMessage & Three20 Framework

changing the MFMailComposeViewController navigationBar title font

旧城冷巷雨未停 提交于 2019-12-06 09:56:47
问题 I have a MFMailComposeViewController and when I've set the subject it also sets it as the subject. The question is how do I customize the font of the title and color? MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; [picker setSubject:@"Feedback for MyApp"]; 回答1: i've changed the font generally for my apps from the app-delegate for all navigation bars of all view controllers. if you don't mind it changing all of your navigation bar title fonts, put something

How to set first Image after Some Text in Email body?

风格不统一 提交于 2019-12-06 07:58:53
I am using MFMailComposeViewController for sending the Email, With this code I am able to get the Image, But image comes after the Text Detail, I wan't First Image and after Text, Here is my code, MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init]; mail.mailComposeDelegate = self; if ([MFMailComposeViewController canSendMail]) { //Setting up the Subject, recipients, and message body. [mail setToRecipients:[NSArray arrayWithObjects:Emailid,nil]]; [mail setSubject:@"Receipt"]; NSData *photoData = UIImageJPEGRepresentation([UIImage imageNamed:@"Gift.png"], 1); [mail

Alternative to MFMailComposeViewController?

百般思念 提交于 2019-12-06 07:52:39
问题 is there an alternative to MFMailComposeViewController that has more-or-less the same functionality, but that will let me handle the sending of the email myself, outside of Apples email-sending system? What I want to do is to provide a nice email dialog, and then send it through a CRM system instead of directly from the iPad. Cheers Nik 回答1: YES, You can use the MailCore Framework. You can handle the sending of email by yourself. Before sending the mail you have to set its fields such as To