The previous maximum was chosen, because the author erroneously
assumed the maximum length of the left hand side of a message id was
64 characters. In fact the maximum length is 255 characters.
if (!preg_match('(^'.EmailGrammar::getGrammar('id-left').'$)', $messageID)) {
throw new \DomainException("The given message id '".$messageID."' is invalid. Note: You must not specify the part right of the at sign (@).");
}
- if (strlen($messageID) > 50) {
- throw new \DomainException("The given message id '".$messageID."' is not allowed. The maximum allowed length is 50 bytes.");
+ if (strlen($messageID) > 200) {
+ throw new \DomainException("The given message id '".$messageID."' is not allowed. The maximum allowed length is 200 bytes.");
}
$this->messageID = $messageID;