mfmailcomposer

Send an email from iOS application without using MFMailCompose UI

扶醉桌前 提交于 2020-01-17 03:38:25
问题 Is there a way to send an email from iOS application without using MFMailCompose UI. I need to send an email with a small (1.5mb) video but using a custom UI. This is not an app that is going to end up in app store because it's going to be in a kiosk environment. So I can use private APIs. The reason that I cannot use MFMailCompose is multi-part. 1) UI is not customisable enough for my specific needs. 2) When you tap on EmailTo field and start typing it populates previously entered email

Why MFMailComposer with <img> is not showing the image in mail?

余生颓废 提交于 2020-01-11 19:59:21
问题 I am sending some images in mail using MFMailComposer . I am converting the image to Base64 and using <img> tag to add images to the HTML body(I am not adding it as attachment ). [htmlString appendFormat: @"<img src='data:image/png;base64,%@' width=300 height=200 />", imageAsBase64]; The images are displaying correctly in MFMailComposer , but there are no images displayed in the actual mail which is sent from the MFMailComposer. What should I do to make it work? 回答1: I had same problem before

MFMailComposeViewController in Swift

青春壹個敷衍的年華 提交于 2019-12-20 10:22:28
问题 This is sample code: import UIKit import MessageUI class ViewController: UIViewController, MFMailComposeViewControllerDelegate { @IBAction func showEmail(sender : AnyObject) { var emailTitle = "Test Email" var messageBody = "This is a test email body" var toRecipents = ["a.nakhimov@gmail.com"] var mc: MFMailComposeViewController = MFMailComposeViewController() mc.mailComposeDelegate = self mc.setSubject(emailTitle) mc.setMessageBody(messageBody, isHTML: false) mc.setToRecipients(toRecipents)

MFMailCompose Custom buttons

痞子三分冷 提交于 2019-12-14 03:06:26
问题 UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithCustomView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cancel.png"]]]; button.target = picker.navigationBar.topItem.leftBarButtonItem ; button.action = picker.navigationBar.topItem.leftBarButtonItem.action; picker.navigationBar.topItem.leftBarButtonItem=button; Hi folks, I'm trying to change the style of the buttons of the mail composer. The above code does change the look of the button, however the action seems to be

Email issue: want to send email without additional window

不羁的心 提交于 2019-12-13 04:42:29
问题 I want to send email without showing MFMailComposeViewController. I just want to send email to some sequence of emails (so user should see only my spinner, not MFMailComposeViewController with send button). The only way to send emails I know is: (but it's not I want) -(void)showMessageController:(id)sender { Class mailClass = (NSClassFromString(@"MFMailComposeViewController")); if (mailClass != nil) { // We must always check whether the current device is configured for sending emails if (

MFMailComposeViewController setToRecipients append String from settings textField trouble

冷暖自知 提交于 2019-12-13 04:33:48
问题 Hopefully this is a simple issue? But I just cant seem to get my head around it. I have a text field in my settingsViewController called emailText where I want to set the default email recipient. @IBOutlet weak var emailText: UITextField! override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { let shoppingListViewController = segue.destinationViewController as! ShoppingListViewController shoppingListViewController.emailString = ([emailText.text]!) } func

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]) {

ios4.3.4: MFMailComposer doesn't send an email, but return MFMailComposeResultSent status

末鹿安然 提交于 2019-12-12 03:14:42
问题 I am using MFMailComposer. I send email to gmail, MFMailComposer returns MFMailComposeResultSent status. But I don't received any email. I tested on iphone4 with 4.3.4. What I do wrong? MFMailComposeViewController *mailPicker = [[MFMailComposeViewController alloc] init]; mailPicker.mailComposeDelegate = self; // Set the subject of email [mailPicker setSubject:@"Subject"]; NSString *emailBody = @"Hello from ios"; // This is not an HTML formatted email [mailPicker setMessageBody:emailBody

No need to save draft in MFMailComposeViewController

萝らか妹 提交于 2019-12-10 20:01:38
问题 After clicking the cancel button of MFMailComposeViewController action sheet of save draft or not is generated. I dont want this action sheet how can i achieve that? thanks in advance. 回答1: From documentation Important The mail composition interface itself is not customizable and must not be modified by your application. In addition, after presenting the interface, your application is not allowed to make further changes to the email content. The user may still edit the content using the

iPhone MFMailComposeViewController cuts off text

醉酒当歌 提交于 2019-12-08 09:35:44
问题 I'm using MFMailComposeViewController inside my application and I've noticed that part of the message has been cut off. Right now it's only trimming the "Sent from my iPhone" text, but should users remove this, I don't want any of the message trimmed back. Here's a screen cap of what I'm talking about: To keep my app description as simple as possible, I'm launching the controller from a TabController and it covers the whole screen as a modalView . 回答1: I had the same problem and found that it