Read mail message sent from MFMailComposeViewController - ios

In an iOS app written with Xamarin, I would like to send a mail and retrieve the sent mail - with any modifications and attachements done to it by the user.
I have implemented the funtion with the MFMailComposeViewController and in the Finished-handler I get the MFComposeResultEventArgs, but I can't see if/where I can get a hold of the actual mail message.
In the back of my mind I think I've heard that one must override the MFMailComposeViewController to accomplish this, but I can't google/bing this.
Is there anyone out there who knows how to do this?

Put simple: You don't. Apple in keeping this information from you by purpose, they are taking the user's privacy quite serious.
If you need to keep track of this kind of information, do not use email but instead maybe a form to send data to your server.

Related

How to send an email +attachment w/o showing the composer

I have inherited an app that, when certain conditions are met, will email data to a known server. The way the previous version worked is that the MFMailComposeViewController would slide up and the user could enter add'l info and then hit send. What we really want to do is send an email programmatically, transparently to the user (i.e. no visual representation unless it fails).
Is this possible, or does Apple not like apps to do this?
Thanks for any help.
IOS doesn't support to mail in background.
These are some questions asked previously on same topic.
1.Send Email in Background from iOS
2.How to send an email to a receipent in background in iOS5?
this might be useful to you.
http://iosameer.blogspot.ca/2013/01/sending-e-mail-in-background-from-ios_25.html
one more thing you can do is lock the fields in mail composer view.
Locking the Fields in MFMailComposeViewController

Prompt user to enable SMS on iPad

I am using MFMessageComposeViewController to send messages. I use canSendText before sending the SMS. However if canSendText returns false i would like to take the user to setting->messages in iPad so that he can turn on messages. Is there a URL Scheme or something other way I can do this ?
This was possible is iOS 5.0-5.0.1 using the prefs:root= url scheme. However, Apple promptly removed this ability in 5.1. Sorry your out of luck. The best we can do is keep filing bug reports on Radar asking for this feature back.
EDIT: From what I've found, there is a way to still do this in 5.1+ for Twitter settings and this may work for messages as well, as long as the message controller conforms to UIAlertView delegate like the twitter controller does (personally not sure about this one), but it absolutely won't work for anything else. Maybe you're in luck after all!
http://goto11.net/programmatically-open-twitter-settings-on-ios-5-1/

Possible to send automated email?

The iOS SDK class MFMailComposeViewController can be used to let the user compose an email message.
What I'd like to do, is for the iOS app to send an email in the background, with no user interaction. Is this at all possible/allowed in the iOS SDK?
Nope. There isn't any API available to do this. You'd need to roll your own SMTP client and have the user enter credentials into your application. On top of that Apple may not approve this.
Unfortunately, I don't think Apple would ever allow this because (for example) then you could just get everyone's email address by auto-sending mail to yourself. :(
I actually wanted to implement something like this for the express purpose of alerting me when a critical error happens on an app in the app market.
Best solution would be to create an API (just ping a php file or something), and have it send the relative alert message to your email).

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)

Resources