Download & Extend

How to handle MMS with a series of images and captions

Project:Mailsave
Version:6.x-1.3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

I'd like to figure out how to handle an MMS message consisting of a series of images and captions. This is basically a series of inline attachments: jpeg, text, jpeg, text, jpeg, text, jpeg, text.

Right now, all the text attachments after the first are simply discarded. The first caption appears as the node body.

What I would like to do is something like, pre-process the message and set any text attachment that follows a jpeg attachment as the description for its preceeding jpeg. Then process the message with mailsave_to_imagefield to save all the images and their descriptions.

Is there interest in mailsave having this functionality built-in or should I just build a custom module to do what I need?

Comments

#1

Status:active» needs review

I ended up writing a small custom module with a hook_mailsave() implementation to handle this. But I did make a small patch on mailsave module, which allows my hook_mailsave() to merge data from the text parts in $node->mimeparts into the right place in the $node object.

AttachmentSize
mailsave-mimepart.patch 955 bytes