简体   繁体   中英

Sending email to hidden recipients from iOS app

Is there a way to send an email from my iOS application without showing the real email address of the recipient?

It would be better if I could hide it completely.

No - this isn't possible and makes little to no sense anyway. (See the existing MFMailComposeViewController and privacy - hiding the To: field? and How to customize MFMailComposeViewController so that i can make the "to" field as non-editable? questions/answers amongst others.)

Additionally as per the MFMailComposeViewController Class Reference docs:

Important : The view hierarchy of this class is private and you must not modify it. You can, however, customize the appearance of an instance by using the UIAppearance protocol. After presenting a mail comopose view controller, your app cannot change the email content. The user can edit the content of a presented instance but the system ignores programmatic changes. If you want to set values for the content fields, do so before presenting the interface.

However, there's nothing to stop you using a different SMTP client than the built-in one ( https://github.com/jetseven/JSMailSender for example) or simply sending the relevant data (via your own app) to a server which then uses this to construct and transmit an email, although this obviously wouldn't have the iOS device's default "owner" email address or indeed any other details unless they were supplied within your app.

If you want to achieve this you can make a web service and send the recipient list to the web service and if the web service is made in php then it is easy to send an email using just a simple mail function in php. So in this way you can hide the recipients and send an email.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM