How do I access in my app content of email created in the app - ios

I have created an iphone app that allows the user to send an email using MFMailComposeViewController. I know that when the email is sent a copy is kelp in the "Sent" emails of the email client. What I wanted to do was also save that data/information to a text file on the iphone (as a log file). I can't find how to access the email information (recipient, body, etc) so as to input into the text file. Can this be done?
Thanks in advance for your help

No it can't be done in that you can't access the user's emails.
Your app can log when you present a MFMailComposeViewController and what data your app filled it in with before it was presented to the user. But you won't know if they changed it.

You dont have access to the email text in MFMailComposer class. What you can do is, create a view to capture to, cc, subject and message and then launch MFMailComposer delegate and prepopulate all the captured data. The user still has to submit the mail and could change the text all together. The captured data can then be stored within the app.

Related

How to send mail on click without present mfmailviewcontroller in iOS?

I want to send my UILabel's text data as a message body to specified email address in text field .BT when I am trying to use MessageUI framework using mfmailviewcontroller delegate it will present its own view controller and after click on send button which is available in mfviewcontroller mail will be sent.
My requirement is to send mail directly on click of send button without Presenting mfmodel view controller screen.Can anyone please hep me for the same ?
.I searched for this BT not found any solution.
In iOS/apple framework doesnt allow application to directly send email without users explicite permission. so you Have to open the compose view controller.
To achive as like above you need to call web service in which web service will send email and you need to pass the email as the web params.

How to send a mail without disclosing recipients mail id in ios

All I am developing an iPhone application in which I have to send mail to recipient without showing email id and the MFMailComposer UI view (i.e without user interaction and also user cant know who is the recipient). Can please tell me how to achieve this?
You cannot send Email without user acceptance. But there are a lot of web-services in internet which can send Email. I guess some app uses those services or uses own.
See also How can I send mail from an iPhone application
You can create a PHP webpage which uses the mail function, just a couple of lines of code.
Then just call the url to that php webpage from your app!

Using MFMailComposeViewController without presenting the view controller

I am using MFMailComposeViewController to send an email with an attachment. In all the guides it chooses to present the view controller as a modal view so that the user can change the fields and choose to send or cancel.
I don't want people to be able to change the information that I have put in, so I was wondering if I could force it to send the email without going to the modal view?
I am aware of using a url with mailto but believe you can't add an attachment.
If anyone knows if this is possible or even better if they know how to do it I would really appreciate the assistance.
Many thanks.
No, you can't do this with MFMailComposeViewController. Apple is very specific in the docs that sending email is under the users control, not your apps. You are sending email from the users account, you can understand why access to the email is restricted I this way - a spambot would be trivial to make if this were not the case.
For the above reason I don't think you'd get an app which sends its own emails from the users account approved for the app store.
You cannot send SMS/Email without user acceptance. But there are a lot of web-services in internet which can send SMS/Email. I guess some app uses those services or uses own.
See also: How can I send mail from an iPhone application?

Can I place an email in iOS's outbox (preferably with MonoTouch)?

I would like to place an email in the iPhones email outbox, without showing the compose window to the user, so that he can not mess with the data that I want to send. Is this possible?
Thanks,
Timo
No - if you want to send an email using the user's email account you must allow them to modify the message contents: that's part of Apple's message framework. To be honest, it's a fairly sensible feature...I don't think many people would want an app that could just send things out without alerting the user or allowing them to modify it.
If you want to send a message and stop the user from messing with your data, just add an attachment and check for the attachment on the backend (assuming that because you want to send specific data)

iPad application to generate a report

I am trying to create an iPad application which has a FORM, after entering the data, when I save, the data needs to be generated as a report and sent as an email to whomever is required (the email is entered in the FORM). I want to know if this can be achieved without using web service . What is the flow in this case? Can the email client on iPad be used for this purpose?
You'd want to use an MFMailComposeViewController to display the interface for sending an email. You can pass your data to this view controller's messageBody property as an NSString. See the documentation for details.
The email message can also include an attachment (a PDF or any other file available to the app) using the addAttachmentData:mimeType:fileName: method of the MFMailComposeViewController object. In this particular case, you'd draw the form to a PDF document. Start with the Drawing and Printing Guide for iOS in Apple's documentation for details.

Resources