MFMailComposeViewController get email "From:" and send email on background - ios

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.

Related

iOS - send email from pre set address (NOT from users address) to set address in background? Ok for app store?

So it seems like this question iOS - Send an email automatically (NOT from user's account) tackles this in Objective-C but I can't find an answer for Swift.
I am creating an app for the app store so ideally this needs to be compliant with Apple's privacy restrictions (I know they have issues sending emails/texts in the background)-
I need to have an email with a SET message body (As in nothing is editable by the user, its all pre programmed) sent from one of MY email addresses (not accessing the user's at all) to another of MY email addresses (again, pre set).
Ideally I don't want the user to see the email form or even know an email is being sent - when a button is clicked, the button already does 1 thing and I just want the email function to be called along with it. I know Apple doesn't allow email to be transparent to the user if being sent from their email address but as this is from one of my email addresses I can't see why I'd be violating anything.
I have looked but can't figure out how to do this in the BACKGROUND (not pulling up the mail form, etc).
In Swift, How can I send a set email from one of my email addresses to another of my email addresses in the background?

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!

Fetch and Send email in iPad app programmatically

What I want is to allow user to send and receive mail from my iPad app. I know that I can user MFMAilComposer but it's for sending only as per my requirement I need to provide all functionaly of an iPad email client app.
As far as I know you can send email using your iPhone app either using background or using the POP3/SMTP see the following link.
Open Source Cocoa/Cocoa-Touch POP3/SMTP library?
However, You can not get the emails received in iPhone mail box. But I think you can receive email from your mail server...See this stack overflow link you will get more idea Can receive mail directly from mail server in custom iPhone app?
Hope my answer helps..

iOS: How to see recipients of an email or text message

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.

How do I access in my app content of email created in the 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.

Resources