SMTP Fails with error 5.3.4 Message Size Exceeds Limit when attachment is 7 KB

I’m running into an error that’s only happening in our orchestrator unattended runs where a process is sending an e-mail with a small attachment (always less than 1MB and often less than 50KB). The e-mail errors out stating Message Size Exceeds Limit even though the limit is 10MB or more. I’m unsure what is causing this as we cannot recreate it when running the same process attended through Studio and it works sometimes through Orchestrator (though it is happening more and more frequently now). Our administrators first called out that the e-mail server was full and cleaned it up which resolved the issue for a day, but it is now happening again with nothing to ‘clean up’ in the server as it’s nearly empty. Any advice on what to look at would be great. Thank you!

Even though your attachment is small, the total message size includes:

  • Email headers
  • Body content (especially if HTML formatted)
  • Base64 encoding overhead (attachments grow ~33% in size)
  • Additional metadata added by automation tools like UiPath

So your 7 KB file might balloon past the limit depending on how it’s processed.

Common Causes

  • Mail server misconfiguration: Some servers enforce overly strict limits or have bugs that miscalculate size.
  • Orchestrator-specific behavior: In unattended UiPath runs, the email might be wrapped with extra metadata or logs.
  • Temporary server issues: A full mailbox or throttling policy might trigger this error intermittently.

What You Can Try

  1. Compress the attachment (even if it’s small) to reduce encoding overhead.
  2. Send a plain-text email instead of HTML to minimize body size.
  3. Use a file-sharing link (e.g., OneDrive or Dropbox) instead of attaching the file.
  4. Check with your mail server admin to confirm the actual size limit and whether it’s enforced differently for automated processes.
  5. Try with a different attachment file/extension and observe the behavior
  6. Test the same email manually from Outlook, another client (powershell/python) to compare behavior.
1 Like