Emailing to multiple recipients with html Mailto: not working

we have 400 to 500 hundred emails, when we concatenate them and put them in mailto: it does not work, browser automatically adds “…” in between emails and clicking link does not work.

<a href='mailto:<a href="" class="__cf_email__" data-cfemail="8ae5e4efcaefe7ebe3e6a4e9e5e7">[email protected]</a>,<a href="" class="__cf_email__" data-cfemail="f98d8e96b99c94989095d79a9694d7d7d7d7cdc9c9">[email protected]</a>'>open emails</a>

Is there a maximum length on mailto: attribute ? is there any other way i can open multiple emails ?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

If you need to email more than one (but not hundreds), the correct form should not have spaces but should have semicolons (especially if the users will likely use Outlook).

<a href='mailto:<a href="" class="__cf_email__" data-cfemail="2b44454e6b4e464a424705484446">[email protected]</a>;<a href="" class="__cf_email__" data-cfemail="c4b0b3ab84a1a9a5ada8eaa7aba9">[email protected]</a>;<a href="" class="__cf_email__" data-cfemail="d3a7bba1b6b693b6beb2babffdb0bcbe">[email protected]</a>'>Contact us</a>

If you want to automatically include a subject line add “?subject=This is the subject”
<a href='mailto:<a href="" class="__cf_email__" data-cfemail="036c6d6643666e626a6f2d606c6e">[email protected]</a>;<a href="" class="__cf_email__" data-cfemail="2357544c63464e424a4f0d404c4e">[email protected]</a>;<a href="" class="__cf_email__" data-cfemail="691d011b0c0c290c04080005470a0604">[email protected]</a>?subject=Webpage contact'>Contact us</a>

Method 2

Just to add a bit more detail… What RFC 1738 actually says is

A mailto URL takes the form:


where is (the encoding of an) addr-spec, as
specified in RFC 822 [6].

and while RFC2822 may have subsumed RFC822, RFC2822 does not change the addr-spec specification (section 3.4.1) as

 addr-spec   =  local-part "@" domain

More specifically, RFC 1738 does not say the URL takes the form of an RFC822 Address Specification but directly says the encoding of an addr-spec.

It is true that in RFC2822, section 3.4 Address Specification, the definition of group is modified from, in RFC822,

 group       =  phrase ":" [#mailbox] ";"

 mailbox     =  addr-spec                    ; simple address
             /  phrase route-addr            ; name & addr-spec

 group           =       display-name ":" [mailbox-list / CFWS] ";"

 display-name    =       phrase

 mailbox-list    =       (mailbox *("," mailbox)) / obs-mbox-list

 mailbox         =       name-addr / addr-spec

which does allow multiple addr-specs, but again, the definition of an addr-spec itself remains unchanged.

I would conclude, then, that while it might work, it is not officially supported.

Method 3

The maxlength 2048 (if you are using Internet Explorer). I think you might what to reconsider you solution.

Refrence here

Method 4

Its a bad practice, its barely possible. Try to rethink your script.

RFC 1783 (URLs) says that a mailto: URL takes an RFC822 address
specification. RFC822 is obsoleted by RFC2822; and RFC2822 says that
an address specification can include a mailbox-list, which is a
comma-separated list of mailboxen. I conclude that what you are trying
to do is permitted.

However UA support for “mailto:” is at best patchy; the recommendation
is to avoid it completely, or failing that restrict yourself to
specifying a single address.

Attempting to include a subject, in particular, will definitely not
work in all UAs. Also note that

It is much better to use a formmail script. That will give you the
kind of versatility you appear to want, while completely sidestepping
the mailto: URL scheme, the deficient browser support that it implies,
and the question of whether any email UA is configured in the first


Method 5

You should create a Distribution List and add all of these emails to this list.

Method 6

Depending on your use case, it might be possible to send an email from the browser like this, but it relies on the user having set up the protocol handler for mailto properly.

For a limited number of users e.g. a few site administrators this could be a good solution. As you can control the set up of the client machine and make sure that it works.

So if you created a page with this link

mailto:<a href="" class="__cf_email__" data-cfemail="d2bfb792b7aab3bfa2beb7fcb1bdbf">[email protected]</a><a href="" class="__cf_email__" data-cfemail="7d421f1e1e400e1210181213182218110e183d18051c100d1118531e1210">[email protected]</a>

mailto:<a href="" class="__cf_email__" data-cfemail="02716d6f676d6c6742677a636f726e672c616d6f">[email protected]</a>?subject=This%20is%20the%20subject&<a href="" class="__cf_email__" data-cfemail="aac8c9c997d9c5c7cfc5c4cff5cfc6d9cfeacfd2cbc7dac6cf84c9c5c7">[email protected]</a>&body=This%20is%20the%20body

Cut and paste in to the address bar to test if this will work on your machine.

I wouldn’t recommend this as a robust solution for any good software product, you should use a server based solution. But if you need something to help with internal systems, or just for a personal site, then this will take minutes and cause fewer headaches then server based solutions.

There are many many options for sending email, I think this one is simple, quick and flexible, but it will not work on all machines, maybe only 70%???

One last thing, usually if you are sending emails to multiple recipients send it to yourself and use the Blind Carbon Copy field (bcc) This means that your not sharing your customers’ email addresses with all of your other customers.


To summarise, if you can test/troubleshoot every single client machine that will use the email link, then consider using a complicated mailto link. Otherwise go for a server side email.

And use the Bcc field for mass emails.

Method 7

I would suggest a DG for this many people but email addresses are not separated by commas but instead semicolons. I have read some people have issues using semicolons in their mailto line. Try encoding the semicolon as %3B, much like you would encode a space as %20.

For example,

mailto:<a href="" class="__cf_email__" data-cfemail="ccbfa3a1a9a3a2a98cbfa3a1a9bba4a9bea9e2afa3a1">[email protected]</a>%<a href="" class="__cf_email__" data-cfemail="c5f687a4abaab1ada0b785b1ada4b1b5a9a4a6a0eba6aaa8">[email protected]</a>?subject=THIS%20IS%20AWESOME

Method 8

Use the bcc= query instead. It supports multiple comma-separated emails and the recipients will not see other recipients in contrast to to main receiver which reveals all other To: addresses (and also sends a reply to EVERYONE in that list.)

Method 9

mailto:<a href="" class="__cf_email__" data-cfemail="137c7d7653766b727e637f763d707c7e">[email protected]</a><a href="" class="__cf_email__" data-cfemail="310e455e0c45465e715449505c415d541f525e5c">[email protected]</a>&<a href="" class="__cf_email__" data-cfemail="5723386a233f25323217322f363a273b327934383a">[email protected]</a>&cc=...

I cannot find the ‘to’ field in official documentation, but it seems to work for more email clients than using separators like commas or semicolons.

It works as hoped on outlook mobile, gmail mobile, apple mail and thunderbird.
On Windows 10 built-in mail app, it only added the last ‘to’ address as a main recipient, the others were likely overwritten. In any case this is an upgrade for our users who previously encountered an ‘invalid email address’ error.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x