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.
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With