开发者

rails3 incoming mail with inline attachments

开发者 https://www.devze.com 2023-03-20 19:04 出处:网络
I have a rails3 app that i am passing emails to from pop box that works great. Then problem is that when i send emails from mac email with attachments.The attachments are inline.

I have a rails3 app that i am passing emails to from pop box that works great.

Then problem is that when i send emails from mac email with attachments. The attachments are inline.

开发者_如何学Python

When i try to save the html_part into my database it also contains the attachment.

If this is a large file this is a massive laod of junk trying to save into the database field.

How can i remove inline attachments from html_part and text_part ?

please help

thanks Rick


During some of our testing with CloudMailin we found that you could iterate through all of the parts and detect if they are attachments or not. That way you can manually construct the text or html part and ignore the attachments. The attachments themselves are never actually within the text they are just additional entries in the list of multipart message.

0

精彩评论

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