How to change boilerplate "Sent from my iPhone" text in MFMailViewController message body?
Asked Answered
Y

3

17

I'm using the MFMailComposeViewController to send an email from within an iPhone v3.0 application. I programmatically create the message body text and display it before showing the picker.

At the bottom of my message body text is the string "Sent from my iPhone." Is there anyway to modify this text or prevent it from appearing? A cursory review of the MFMailComposeViewController Class Reference and quick Googling doesn't turn up anything.

Thanks in advance.

Yucca answered 25/9, 2009 at 13:18 Comment(0)
C
13

As far as I know, this is a global mail setting that can be specified by the user. By default the signature is set to "Sent from my iPhone", but it can be changed in Settings - Mail,Contacts,Calendars - Signature

Chiarra answered 25/9, 2009 at 13:27 Comment(0)
D
2

If you are referring to the signature in the iPhone Simulator, it's just there by default. There's no Mail.app and therefore no settings for Mail to disable it. You can't actually send an email either, but it's just nice that they at least enabled MPMailComposeViewController. If you use MFMailComposeViewController, the user's signature on their own device will display in the bottom of your custom app message.

Demob answered 25/9, 2009 at 19:58 Comment(0)
T
0

No actual programmatic way to do this.
It is using signature from Settings.
To remove the signature on your phone, open Settings app, type Signature and tap Signature option from the list, as in image.
You will be prompted a textfield which you can leave empty to remove the signature:

1 2

You can add some kind of signature programmatically, using preset text:

let mail = MFMailComposeViewController()
mail.setMessageBody("<br><br><br><p>Some user metadata here</p>", isHTML: true)

and it will look like this, assuming user has deleted his signature in Settings, otherwise signature will be below Some user metadata here:

3

Trilogy answered 16/2, 2023 at 23:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.