mfmailcomposeviewcontroller

Difference between mailComposeDelegate and simple Delegate property

穿精又带淫゛_ 提交于 2019-12-13 02:08:51
问题 Hi i am getting confuse on MFMailComposeViewController delegate property, when i set mailer.mailComposeDelegate app crash just after call [self presentModalViewController:mailer animated:YES]; and when i do mailer.delegate then app don't crash but its view can't hide after sending mail or just cancel it from its navigation bat button "Cancel". I am getting stuck why this happen. Let me share code, you get hint where i am doing mistake. if ([MFMailComposeViewController canSendMail]) {

Alternative ways to send email without UI from ipad or iphone

半腔热情 提交于 2019-12-12 09:57:28
问题 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

MFMailComposeViewController dismisses right away

末鹿安然 提交于 2019-12-12 09:28:56
问题 The situation is the MFMailComposeViewController was going to be presented. I saw it was presented half-way done, but then it got dismissed. This is the error: _serviceViewControllerReady:error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" This is my source code to present the MFMailComposeViewController: -(void) MailExecute { if ([MFMailComposeViewController canSendMail]) {

iOS MFMailComposeViewController and getting users Name from contact card

纵饮孤独 提交于 2019-12-11 18:05:14
问题 I want to get the "Me" card's Name so when i create the mail window with MFMailComposeViewController I can MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init]; mailer.mailComposeDelegate = self; [mailer setSubject:@"Suggestion: from (Name of Person)"]; Basically substitute the (Name of Person) with the name on their contact card. 回答1: You can't get the "Me" card from the iOS SDK. There's a me method for the mac, but not for iOS. If the name of the person will be

Click alert button to show MFMailComposeViewController

人走茶凉 提交于 2019-12-11 16:54:55
问题 Trying to use MFMailComposeViewController when click alert button. But when I click alert button, controller doesn't pop-up. The code is below. I used extension and I'm trying to call sendmail function when clicking alert button. extension Alert:MFMailComposeViewControllerDelegate { func sendmail(){ let mailComposeViewController = configureMailController() if MFMailComposeViewController.canSendMail() { let VC = storyboard?.instantiateViewController(withIdentifier: "MainVC") VC?.present

How to send mail from iphone app?

馋奶兔 提交于 2019-12-11 16:01:51
问题 I am try to send mail from my app. I want to type(dynamically) recipient id,ccid,sub and message. Thanks Senthilkumar 回答1: on iOS 3+ Import #import in your view controller header. Then: -(void)showMailPanel { MFMailComposeViewController *mailComposeViewController = [[MFMailComposeViewController alloc] init]; // only on iOS < 3 //if ([MFMailComposeViewController canSendMail] == NO) // [self launchMailApp]; // you need to mailComposeViewController.mailComposeDelegate = self;

MFMailComposeViewController email to field limit 40 in iphone

情到浓时终转凉″ 提交于 2019-12-11 15:07:05
问题 I am using MFMailComposeViewController for sending emails. Mine is universal app and toField of email is having 2 mail ids. (1) Each email id is around 30 characters long. In iPhone I see it as "+2 recipients". (In iPad able to visualize the email ids in toField.) And when I Googled, found that there is a restriction of 40 characters of text limit in toField. How to avoid this problem. (2) Also if I click on "+2 recipients" it is displaying the email ids but then not able to hide the keypad

MFMailComposeViewController crash in iOS6 ARC

为君一笑 提交于 2019-12-11 12:38:31
问题 Iam presenting MFMailComposeViewController from my custom class(not a viewController). In iOS5 it is working fine but in iOS6 it is getting crash immediately after presenting the compose sheet. I found the issue the dealloc method is getting called after presenting the view, so self is deallocating . Due to this mailcomposer cannot call the delegate method on self so it is crashing. I didnt get a solution for that. Am using ARC . How to prevent self from deallocating until the delegate method

How can I send emails from my custom UIActivity class?

拈花ヽ惹草 提交于 2019-12-11 10:39:54
问题 I made a costume UIActivity class. I like to send emails with attachments with the class, but I can't send emails, or present any ViewControllers from the class. I am trying to present the Mail ViewController with this: - (void)prepareWithActivityItems:(NSArray *)activityItems { NSString *subject = [NSString stringWithFormat:@"%@", [self.filePath lastPathComponent]]; NSString *messageBody = [NSString stringWithFormat:@"%@ was extracted with @FilyForiOS, visit", [self.filePath

How to remove the path from an attachment when calling addAttachmentData?

梦想的初衷 提交于 2019-12-11 08:56:14
问题 When adding an attachment to an email, the file name gets it's complete path. For a file located in: /var/mobile/Applications/C3BBAA5F-07FE-4E26-9661-CB492E06BD2E/Documents/ I'm getting as a result, a file named: _var_mobile_Applications_C3BBAA5F-07FE-4E26-9661-CB492E06BD2E_Documents_Clock.sqlite When I need my filename to be: Clock.sqlite Here's my code: NSString *path = [self getDatabaseFilePath]; NSData *myData = [NSData dataWithContentsOfFile:path]; [picker addAttachmentData:myData