开发者

Sending large email attachments with actionmailer and heroku from s3

i have an app that stores uploaded files in s3, once complete a mail is sent with the attached file. The app works fine when attachments are between 0-15 Mb in size. However when i attached something larger like 16 Mb it fails and returns the error:

Net::SMTPFatalError: 550 Could not send 开发者_StackOverflow中文版e-mail, max size of 20480000 bytes exceeded

1). Firstly i do not understand why it fails as, 16Mb < 20480000 bytes(+/-19 Mb)

2). How can i mail files larger than 19Mb

I am using heroku's sendgrid addon, and rails 3 with amazon s3


Normally when you attach a binary file to a mail message it gets translated to an ASCII format, and the size grows with about 30% - in your situation that means the maximum file attachment can have somewhere between 15 and 16M.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜