2

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?

freginold
  • 3,946
  • 3
  • 13
  • 28
Patrick Connors
  • 5,677
  • 6
  • 27
  • 54

2 Answers2

5

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

Community
  • 1
  • 1
freginold
  • 3,946
  • 3
  • 13
  • 28
  • 1
    Its probably worth quoting https://tools.ietf.org/html/rfc5322 as well. 6068 specifies the href format which primarily deals with "To" as quoted but for CC that is just an but the cc field when used is an `hfield` in the 6068 spec which is basically a way of specifying a header: " and are encodings of an [RFC5322] header field name and value, respectively." so the format of CC fields is specified by 5322. That does of course still use comma as a separator so the conclusion is still the same and accurate. – Chris Aug 28 '17 at 18:27
  • Thanks @Chris, I'll add that in. – freginold Aug 28 '17 at 18:32
  • Outlook (at least my version, Outlook 365, U.S. English) doesn't change behavior due to the List Separator in the regional settings. It wants semicolons regardless. If you change the option listed in Laurence's answer below, Outlook accepts commas but then changes them to semicolons before actually sending. – phantomflash May 11 '23 at 03:13
2

There is a setting you can change in Outlook:

File/Options/Mail/send messages/

and check tick box for

"Commas can be used to separate multiple mail recipients"

Laurence
  • 21
  • 1