I searched through many places but i can't find any answer to this exception.
I'm trying to develop an e-mail service to send messages with attachments. My project uses .NET Core 3.1 and the mail service is MailKit 2.11. The attachments can be at maximum size of 10MB. Without attachments, or with small attachments (under total 7MB) everything works fine and i can send to multiple addresses with no problems.
But heres what is happening: if i try to send an e-mail (doesen't matter if it is to one or more addresses) with attatchments with 7.5MB or more, i got an exception and the e-mail is not sent. Heres the exception data of my debbuging:
Message: "5.7.1 : End-of-data rejected: Throttling quota exceeded"
ErrorCode: MessageNotAccepted
StatusCode: TransactionFailed
Exception Class - MailKit.Net.Smtp.SmtpStatusCode
I looked up through all the internet and i can't find anyone with this same message. I'm gettin upset because i don't know what to do. It is not the SmptClient.MaxSize because i have not setted the Capabilitie to do so, and i'm using port 587 to send the e-mails.
Thank you if you readed this far.
It is not the SmptClient.MaxSize because i have not setted the Capabilitie to do so
It's not you who gets to set that, it's up to the SMTP server to set that.
My guess is that you really are hitting the size limit and here's why:
You say that this happens when you have attachments totalling 7.5MB or more but your server allows up to 10 MB.
The problem is that when 7.5 MB of attachments get base64 encoded, that becomes 10 MB added onto the message headers and attachment headers and you've just exceeded the SMTP server's 10 MB limit.