Search code examples
c#.netsmtpclientmailmessage

MailMessage rejected 4.3.1 by server but is under the exchange limit


I've looked at a few answers like this one, but please notice that this is different.

  • I have a implementation of MailMessege and SmtpServer in a C#.NET class where I'm trying to send attachments on error of a lab instrument.
  • Here's the thing: I checked with IT and they said our exchange server is set to have a message max size limit of 50,000 KB.
  • However, if I send a message with an attachment over about
    14,500KB, the message gets a

Exceeded storage allocation. The server response was: 4.3.1 Messagesize exceeds fixed maximum message size

Most of the time, we'll be under 10MB, so it's not a big deal, but it just doesn't make sense. IT suggested I that pursue a developer-side solution since they think it should be going through.


Solution

  • Any intermediary SMTP server could also have it own limit on attachment size. You could check in the message header which server have relay the email.