Is there a way to add a popup about the size limit of email content when it exceeds ?

Ramkumar Thanga
Mega Sage

Hi All,

 

When the email body reaches the maximum size, the email was not sent out with the error message as "552 5.3.4 message size exceeds fixed maximum message size". So is there a way to add a popup about the size limit of email content when it exceeds the defined message size while sending the email from compose email option in ServiceNow.

 

 

Thanks!

Ramkumar

1 ACCEPTED SOLUTION

@Ramkumar Thanga 

you can show an alert when compose email opens that popup

check this KB for message you want to show

Email server size limit prevents emails from being sent or received 

Create this new UI script

addLoadEvent(hideButtonsAdd);

function hideButtonsAdd() {
    if (document.URL.indexOf('email_client.do') != -1) {
        alert("Please don't exceed 10MB email size"); // give your message here
    }
}

AnkurBawiskar_1-1747991203550.png

 

Output:

AnkurBawiskar_0-1747991167252.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

11 REPLIES 11

SumanthDosapati
Mega Sage
Mega Sage

@Ramkumar Thanga 

 

  • 552: SMTP error code indicating a permanent failure.

  • 5.3.4: Specific subcode referring to message size limitations.

  • "Message size exceeds fixed maximum message size": The message (including attachments, HTML, headers, etc.) is larger than the allowed limit.

ServiceNow default has 10 MB limitation for outbound emails. So we cannot know this during configuration unless you find a way to preprocess the script and find its size. 

If it just contains text, that might be possible by doing some checks like body.length > 10485760  // 10 MB

but an email can contain attachments also so it is not possible as they can be dynamic aswell.

 

Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth

 

Can we raise this as a Idea Request with ServiceNow.  

Yes you can do it. But it might or might not be accepted and it even takes months, years for that to be live.

https://support.servicenow.com/ideas

 

Regards,
Sumanth

Hi @SumanthDosapati ,

 

Is it possible to display an alert about the email body limit while the agent tries to compose email  ?

 

Thank!
Ram