mfmailcomposeviewcontroller

Getting the Recepients list in MFMailComposeViewController

淺唱寂寞╮ 提交于 2019-12-03 14:25:00
I am using MFMailcomposerViewController in my App. Everything is working fine, except that I am in need to Have the no. of recipients and the list of recipients the user is sending to. Any help or solution regarding this issue.. I dont there is a standard way to do this, the delegate method mailComposeController:didFinishWithResult:error: gives you a reference to the composer view controller after it has been dismissed, but there are no accessors on MFMailComposeViewController which you could use to get the recipient count A workaround would be to examine the subviews of the view controller,

Failed on using Swift to implement in-app email

别说谁变了你拦得住时间么 提交于 2019-12-03 12:48:49
I want to use swift to implement in-app email. When I click the button, the email window pops up. However, I am unable to send my email. Moreover, after I click cancel-delete draft, I cannot go back to the original screen. import UIkit import MessageUI class Information : UIViewController, MFMailComposeViewControllerDelegate{ var myMail: MFMailComposeViewController! @IBAction func sendReport(sender : AnyObject) { if(MFMailComposeViewController.canSendMail()){ myMail = MFMailComposeViewController() //myMail.mailComposeDelegate // set the subject myMail.setSubject("My report") //To recipients

how to add .vcf file as attachment in application iphone

被刻印的时光 ゝ 提交于 2019-12-03 07:48:37
In my app I want to add .vcf file as attachment in MFMailComposeViewController. 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 you should uses the .vcf extension to ensure that email programs will understand it. Use the below code to

dismissModalViewController Hides the parent view behind status bar

谁说胖子不能爱 提交于 2019-12-03 05:43:28
I have a very strange issue here. I am using a present modal view controller to display my MFMailComposer ViewController on top of a ViewController which is placed with in a Navigation Bar. [self presentModalViewController:emailviewController animated:YES]; to hide , I use ... -(void) mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error { [self dismissModalViewControllerAnimated:YES]; } Everything works fine but when I dismiss my MailComposer the original view controller hides behind the status bar . I have tried

how to send a mail from my iOS application- SWIFT

雨燕双飞 提交于 2019-12-02 17:17:49
I want to send a mail from my application. I am doing my first steps with SWIFT and i have stuck at a point. I want to press a button and open up the mail. Can you please tell me how to do the button connection? I think it should be an action but I don't know where to put it on the code import UIKit import MessageUI class ViewController: UIViewController, MFMailComposeViewControllerDelegate { func sendEmail() { let mailVC = MFMailComposeViewController() mailVC.mailComposeDelegate = self mailVC.setToRecipients([]) mailVC.setSubject("Subject for email") mailVC.setMessageBody("Email message

Unable to dismiss MFMailComposeViewController, delegate not called

孤街醉人 提交于 2019-12-02 15:24:16
I am calling MFMailComposeViewController from a UITableViewController . Problem is the delegate method is never called when I select Cancel or Send button in Mail compose window: mailComposeController:(MFMailComposeViewController*)controllerdidFinishWithResult Here is the table view class: @implementation DetailsTableViewController - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section==0 && indexPath.row==4) { //SEND MAIL MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; controller

how to send email using UIbarbuttonitem without using MFMailComposerViewController

喜你入骨 提交于 2019-12-02 13:04:39
问题 I want to send email using rightBarButtonItem without using MFMailComposerViewController. Is It possible to send email using barButtonItem? Any Idea how to do this? thanx in advance. 回答1: You'll find a fantastic code sample on the accepted answer here to send a background email: Locking the Fields in MFMailComposeViewController All you need to do is setup your rightBarButtonItem's target to fire a method containing this email code, and then populate the message contents etc using the

how to send email using UIbarbuttonitem without using MFMailComposerViewController

旧街凉风 提交于 2019-12-02 04:31:14
I want to send email using rightBarButtonItem without using MFMailComposerViewController. Is It possible to send email using barButtonItem? Any Idea how to do this? thanx in advance. Luke You'll find a fantastic code sample on the accepted answer here to send a background email: Locking the Fields in MFMailComposeViewController All you need to do is setup your rightBarButtonItem's target to fire a method containing this email code, and then populate the message contents etc using the information you want to send. Hope this helps! Zeroed In Set an action method for the right bar button item and

MFMailComposeViewControllerDelegate not being called

我只是一个虾纸丫 提交于 2019-12-02 01:42:43
问题 I realize this question has been inexactly asked around, but I haven't been able to find an answer to my problem. I have a UITableViewController with static cells. One of these cells is meant to open a Mail Composer view, and dismiss it through the delegate after the user sends or cancels the email. My problem is that the delegate method is not being called. Here is my code: class SideMenuTableViewController: UITableViewController, MFMailComposeViewControllerDelegate,

MFMailComposeViewControllerDelegate not being called

六眼飞鱼酱① 提交于 2019-12-02 00:37:13
I realize this question has been inexactly asked around, but I haven't been able to find an answer to my problem. I have a UITableViewController with static cells. One of these cells is meant to open a Mail Composer view, and dismiss it through the delegate after the user sends or cancels the email. My problem is that the delegate method is not being called. Here is my code: class SideMenuTableViewController: UITableViewController, MFMailComposeViewControllerDelegate, UINavigationControllerDelegate { override func viewDidLoad() { super.viewDidLoad() mailCVP.delegate = self mailCVP =