Support Article

Unable to send email with large attachments

SA-33651

Summary



Upon sending an attachment of base64 encoded file, the size of the attachment is increasing.

As a result of this attachment are not being sent as the SMTP server is configured to send attachment up to 15 MB.


Error Messages



(pega_integrationengine_default) ERROR - Unexpected exception caught while trying to send an email message with sender ID of <ABC> and addressee of <XYZ>:
com.sun.mail.smtp.SMTPSendFailedException: 552 5.2.3 Message exceeds maximum fixed size (23068672)


Steps to Reproduce

1. Create a Case with utility shape to send an email.
2. Utility shape is configured to use SendEmailWithAttachments rule.
3. Run the case and attach a file.
4. Turn on the tracer.
5. Complete send email step, the value of the pyData field is observed to be of size more than the original size of the attachment.
This increase of size in file size is causing the problem as allowed size on SMTP server is 15 MB.


Root Cause



A defect or configuration issue in the operating environment.

This is a normal behavior, if base64 encoded stream is given to the server, it encodes it as 4 bytes for every 3 bytes.

Resolution



Here’s the explanation for the reported behavior:

Base64 encoding mechanism have been explained to the user, if base64 encoded stream is given to the server, it encodes it as 4 bytes for every 3 bytes.

Following is the alternate local-change:

1. Limiting the size of the upload.
2. Changing the SMTP server configuration to allow bigger size files.

Published February 13, 2017 - Updated March 3, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.