0

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.

Amar
  • 13,202
  • 7
  • 53
  • 71
nicky_1525
  • 929
  • 1
  • 10
  • 24
  • How do you expect it to be delivered? How are you composing this e-mail? – trojanfoe Oct 08 '13 at 09:21
  • possible duplicate of [MFMailComposeViewController and privacy - hiding the To: field?](http://stackoverflow.com/questions/3241152/mfmailcomposeviewcontroller-and-privacy-hiding-the-to-field) – John Parker Oct 08 '13 at 09:23
  • I preset it and hide it only to the user... – nicky_1525 Oct 08 '13 at 09:23
  • 1
    How about this answer? http://stackoverflow.com/questions/11722269/framework-for-smtp-sending-with-ios – trojanfoe Oct 08 '13 at 09:28
  • You may also find the answer here to be of use... http://stackoverflow.com/questions/6284599/locking-the-fields-in-mfmailcomposeviewcontroller – Luke Oct 08 '13 at 12:50

2 Answers2

1

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.

Community
  • 1
  • 1
John Parker
  • 54,048
  • 11
  • 129
  • 129
0

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.

Geekoder
  • 1,531
  • 10
  • 21