Getting around mailto / href / url character limit

26,758

Solution 1

Is there a way to get around the limit?

Very hardly.

It is even probable that the limitations vary from browser to browser, or from E-Mail client to E-Mail client.

I would rather use a HTML form and a server-side script to send the message.

Solution 2

Yes, there is a limit on the length of the URL.

The limit varies from browser to browser, so you should keep the URL below 2000 characters to be safe.

Internet Explorer seems to be the browser that is having the shortest limit. According to this article it's 2083 characters.

Share:
26,758

Related videos on Youtube

HyderA
Author by

HyderA

Updated on July 09, 2022

Comments

  • HyderA
    HyderA almost 2 years

    I have a mailto link in an anchor tag

    <a href="mailto:?subject=Subject&body=Body">Email This</a>
    

    The issue is that the Body parameter is a huge article, and there appears to be a character limit on the url.

    Is there a way to get around the limit?

  • HyderA
    HyderA over 13 years
    I don't want to email the message. I want it to work like a regular mailto link, where the user can send an email via their mail client.
  • Pekka
    Pekka over 13 years
    @gAMBOOKa I see. You may be out of luck for that... Maybe send a link to the information instead?
  • HyderA
    HyderA over 13 years
    Yes, i guess an excerpt and a link will have to do. Thanks!
  • VKen
    VKen over 11 years
    The answer seems similar to others that are already posted and is not very useful. Do you have more details to add?
  • Spork
    Spork almost 11 years
    This also holds for href="" which was a problem for my href="javascript: new Array(.....)" (very long array)
  • HyderA
    HyderA about 6 years
    It works by splitting the emails listed in mailto if the url is too large and calling mailto manually for each sliced set of emails. This only works if there are too many emails (as opposed a large body asked in the original questions) and it creates multiple email drafts in the mail client.
  • HyderA
    HyderA about 6 years
    No, it will create multiple emails with body parts.