I'm using MFMailComposeViewController and MFMessageComposeViewController.
After the user sends an email or text. How can I tell who they sent it to?
You can't. Apple intentionally does not disclose this info to the app that presented the interface.
Related
I am newer in iOS development.I got an email id of a person in textview then on click of this email id. I need to get information of email just like native mail in iOS.
For that you need to store or have information related to that email in your app. So when user would tap on your textview then you could check for condition that it should not be nil and email validation. As you have verified then you can fetch data from your app related to that email and show in a pop-up view.
You need to have information for email or fetch anyhow.
You can use delegate methods and in endediting you can check for condition that it should not be nil and email validation.
Hi,
I have an app that has a feature to send email. I have success do that by using MFMailComposeViewController. For next requirement, I have 2 questions here:
How can i get "email list from" (that showed in dropdown, tesmojones2#gmail.com & tesmojones3#gmail.com) in Objective-C.
Can i send email via background? without showing MFMailComposeViewController.
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!
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.
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?