mailto with multiple cc addresses

You need a semi-colon as the separator.

<a href="mailto:[email protected]?subject=[Help]%20Base Leisure&[email protected];[email protected]">Contact Email</a>

Some e-mail clients (e.g. Android's GMail) won't allow mailto: links to duplicate the same e-mail address in both To: and Cc: fields.


Adding on to this now, as I've spent some time dealing with this issue. This is going to be mostly for desktop applications, and its absolutely not foolproof. Its just the most reasonable option.

Outlook for PC only accepts semicolons as a separator. Commas will break it. Some common mail applications in recent years accept both semicolon and comma. And everything except outlook accepts a comma. For example, Apple Mail does not accept semicolons, especially if you have more than 3 addresses separated, but Gmail has no issue.

Its a bad catch 22, the best solution seems to be to check the users platform via window.navigator.platform, and if you see Windows change the separator to a semi-colon. It's absolutely not a bullet proof solution, and you should avoid relying on a mailto link if you need this sort of functionality. But if it must be done, check the platform and hope for the best.

This solution is tested for these default applications, assuming the user is running recent operating systems:

Mac (comma): Outlook for Mac, Apple Mail, Gmail, browser Gmail

Windows (semicolon) : Outlook 2011 onward, Windows Mail, Gmail.

iOS (comma): iOS Mail, Gmail

Tags:

Html