1

I am creating my second iPhone app, and I've included a feedback form using MFMailComposeViewController. This displays and works correctly, but I'm not sure I want all my users to see my email address. Is there any way to set the to: field to my email address, and then hide it so that the user doesn't see it?

Many thanks, Javawag

Javawag
  • 1,547
  • 2
  • 16
  • 23

3 Answers3

7

This isn't practical. Even if you were to successfully hide the “To” field in the compose view controller (which would be difficult and probably get you rejected from the App Store), your users could easily see the email address they sent feedback to by checking their email account's sent-mail folder. IWasRobbed's idea—creating an email account specifically for your business or app—is probably the best solution.

Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131
  • 1
    That's a good point - I didn't think of the sent mail folders! I think I'll go with IWasRobbed's idea then - I can set up the new account to forward to my main account anyway, and have gmail put it under a separate label. – Javawag Jul 14 '10 at 10:53
3

I had the same request from a client where they wanted to mask the email address from the end user. Figured it out by using a formatted email address: displayString <email@provider.com>

NSString *yourEmail = @"myemail@gmail.com";
MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init];
NSString *emailString = [NSString stringWithFormat:@"App Feedback <%@>", yourEmail];
[mailComposer setToRecipients:@[emailString]];

It effectually gets you the first image below in the email composer. Then the user has to tap on the App Feedback text a couple of times before they can reveal what the actual email address, see second image.

screen grab of formatted email string screen grab of revealed email string

jhelzer
  • 295
  • 2
  • 12
1

Swift 5 @jhelzer answer

let yourEmail = "myemail@gmail.com"
let mailComposer = MFMailComposeViewController()
let emailString = "App Feedback <\(yourEmail)>"
mailComposer.setToRecipients([emailString])
David
  • 857
  • 1
  • 11
  • 25