I'm pre-populating the 'Cc' and 'To' fields of an email via a mailto:
link in HTML. When I separate the emails in the Cc field with a comma, it works in the Gmail client but not in Outlook. The opposite is true when I switch it to a semicolon.
Is there a different separating character I should be using?
The comma (,
) is the correct character, per the RFC 6068 specifications:
to = addr-spec *("," addr-spec )
However, as noted in this Stack Overflow answer, some users may have Outlook configured to use the semi-colon instead, which will present problems:
Even though RFC explicitly recommends a comma, Microsoft Outlook will use the "list separator character" defined in the regional settings. Your mailto links may not work correctly for your Windows + Outlook users whose systems are configured with a different list separator such as semicolons. Outlook will simply refuse to split the e-mail addresses with commas.
I know that's not the answer you want to hear. You can configure Outlook to look for the comma instead of semi-colon, but that's something that would have to be done for each user -- not something you could do server-side or from your app. You may be able to code up a check to see if Outlook is being used as the client, but beyond that, your options are limited.
Sources:
UPDATE:
As mentioned by @Chris, RFC 5322 also designates the comma as the "official" separator character between recipients:
to = "To:" address-list CRLF
cc = "Cc:" address-list CRLF
bcc = "Bcc:" [address-list / CFWS] CRLF
address-list = (address *("," address)) / obs-addr-list