Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am using SMTPclient to send mail with attachment. When the attachment is more than 2mb, I am getting the below error: ** "Exceeded storage allocation. The server response was: 4.3.1 Message size exceeds fixed maximum message size". **

1) Can i send email ** using smtpclient with attachment size >2mb. ** If yes, What is the limit of attachment.

2) How can i fix the above error?

Please give me an idea,if you have the solution.

like image 511
Ramesh.kbvr Avatar asked Apr 11 '11 09:04

Ramesh.kbvr


2 Answers

Modern SMTP mail servers have a configuration variable to set the maximum allowed message size. This defines the largest amount of data the mail server will accept in a single message. If you're trying to send a larger message, the server will reject it. You have quite a few options, however:

  1. Compress the attachment to reduce its size (e.g. using zip)
  2. Change the maximum message size limit on the server, but this requires admin access to the server
  3. Break your message down into smaller chunks, where each chunk is smaller than the server limit.
  4. Use a different mechanism/protocol to transfer the attachment.
like image 123
odrm Avatar answered Nov 16 '22 20:11

odrm


You can't "fix" that. This seems like your server just doesn't allow you to send such huge attachments. Unless you've got control over the server and are able to change that limit there's nothing you can do. Only alternatives I could think of would be providing the attachments through http or ftp and linking to the attachments instead.

like image 42
Mario Avatar answered Nov 16 '22 21:11

Mario