What is the maximum length of a URL that can be safely used in an email?

My site sends an email with a link. Recently, we have had a lot of errors indicating that the URL in the email we are sending is somehow distorted. Unfortunately, we have no logs indicating that the URL they were trying to access was just that. I ruled out a number of possibilities (bad data, bad url encoding, etc.) The only thing I did not rule out is that the URL is truncated by our users email clients. The URL is slightly different for each user, but usually the URL will be between 210 and 220 characters long.

My question is: generally, what is the maximum length of a URL that can be safely sent in an email client to ensure consistent behavior?

UPDATE

I know that there are a number of SO questions related to the maximum URL length, but my question is specific to the hyperlink in the mail client, and I cannot find this.

+4
source share
1 answer

Good style recommendation [URL Length <= Recommended String Length]

The URL should fit on one line, a single line of email should contain 78 characters (minus at least two characters for quoting in response).

https://www.rfc-editor.org/rfc/rfc5322.txt

2.1.1. Linear length limits

There are two restrictions that this specification places on the number of characters in a string. Each character string MUST be no more than 998 characters, and MUST be no more than 78 characters, excluding CRLF

+3
source

All Articles