Email set to received-ignored because its size exceeds the value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 11:00 PM
Hi ,
Need help with inbound email.
I am getting error string as - Email set to received-ignored because its size exceeds the value set in com.glide.email.max_body_bytes. This property is also not set in our instance.
How can I calculate the total characters of the email. Does this character count refer to the number of chars present in the HTML body field.( that is 509465 in my email)
Could you please advise on this error.
Thank you .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2023 02:58 AM
Hi @chandan31 ,
To calculate the total characters of an email, you can use the following steps:
Retrieve the email body content from the email source or the record in ServiceNow.
Determine the encoding of the email body. Common encodings include UTF-8 and ASCII.
Convert the email body content to bytes using the corresponding encoding. For example, if the encoding is UTF-8, you can use getBytes("UTF-8") to obtain the byte array.
Get the length of the byte array to determine the number of bytes in the email body.
Please note that the com.glide.email.max_body_bytes property expects the email body size in bytes, not the number of characters in the HTML body field. Therefore, you need to calculate the size in bytes as described above.
Thanks,
Ratnakar