iOS does not parse aliases in the EmailAddress field of the Mail configuration profile automatically

Originator:guillaume.algis
Number:rdar://35667841 Date Originated:22-nov.-2017 04:56 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 10+ (reproduced on 11.1 (15B93))
Classification:Other Bug Reproducible:Always
 
Summary:
When configuring an email account using a configuration profile (generated from example using Apple Configurator 2, but I also reproduced the issue with my MDM provider), the "EmailAddress" field of the payload may contain multiple email addresses separated by commas.
On iOS 10+ (maybe earlier too), the field will not correctly be parsed when the configuration profile is installed, and the whole string will be used as an email address.
So, for example `<string>john.appleseed@example.com, john@example.com, j.appleseed@example.com</string>` will not create 3 distinct aliases for the same mail account, but one email address with the whole thing (which is obviously incorrect).

The problem can be solved by manually navigating to the mail account configuration in Settings, opening the account configuration view, and closing it right after by touch the "OK" button, without any other modifications. This will apparently force the field to be parsed again, this time correctly.

It looks like it's a bug, and that the aliases should be parsed while installing the profile, without requiring the user to manually re-open the email account configuration.

------------------------------

Attached is an example configuration profile with which you can reproduce the issue.

Attached are also screenshots of the whole process :
# 1-configuration-received.jpeg
    This is what the mail configuration looks like just after having installed the profile. Note the address field ("Adresse" in French), for which the value (in gray) is a string with the 3 aliases displayed.

# 2-from-field-before.jpeg
    This is what the compose mail view looks like just after having installed the profile. No "From:" field is available, but we expected to be able to chose what email alias we want to send the email from.

# 3-configuration-after-ok.jpeg
    This is what the mail configuration looks like after we opened it and closed it at least once by touching "OK". Notice the "Adresse" field now looks different, with only the first alias shown, and a disclosure indicator.

# 4-configuration-after-ok-submenu.jpeg
    This is the view you have once you touch the "Adresse" cell on screenshot 3. This lists the aliases, which have apparently been re-parsed correctly after we closed the configuration between 1. and 3.

# 5-from-field-after.jpeg
    The mail compose view once the aliases are correctly parsed. This is what was expected immediately after installing the profile, without having to manually re-validate the email account configuration in Settings.  

Steps to Reproduce:
1. Create an email configuration profile in Apple Configurator
2. In the "Email Address" field, type in at least to email adresses, separated by a comma
3. Install the profile on an iOS device
4. Open Mail on the Device
5. Compose a new mail

Expected Results:
Mail displays the "From:" field, allowing the user to chose between the email addresses aliases defined in step 2.

Actual Results:
Mail does not display the "From:" field, and assumes that the sending email address in the concatenation of all aliases.

Version:
iOS 10+ (reproduced on 11.1 (15B93))

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!