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:[email protected],[email protected]@email.com'>open emails</a>
Is there a maximum length on mailto: attribute ? is there any other way i can open multiple emails ?
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:[email protected];[email protected];[email protected]'>Contact us</a>
If you want to automatically include a subject line add "?subject=This is the subject"
<a href='mailto:[email protected];[email protected];[email protected]?subject=Webpage contact'>Contact us</a>
Just to add a bit more detail... What RFC 1738 actually says is
A mailto URL takes the form:
mailto:<rfc822-addr-spec>
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
to
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.
The maxlength 2048 (if you are using Internet Explorer). I think you might what to reconsider you solution.
Refrence here