This is by far one of the best modules for drupal. Really digging it.

One question, is it possible to upload 2 images and have them routed to two different CCK imagefields? Basically, for one of my content types I have:

press_thumbnail_image
press_fullsize_image

I would love to be able to put both images in an email and either use a tag or just the order determine which field they relate to.

Comments

Stuart Greenfield’s picture

Glad you like mailsave.

The mailsave to imagefield module won't, as it stands, do what you want, but it should be fairly simple to customise it to make it work how you describe.

Mailsave passes all available attachments to "consumer" modules, so seeing as there is already a module to add an image to one imagefield it shouldn't be too hard to adapt the code to cope with more than one.

For now I will need to park this request as I'm in the process of upgrading modules ready for Drupal-6.

If you want to try to do it yourself, start with the mailsave to imagefield module. Otherwise I'll park this issue and come back to it shortly.

Stuart Greenfield’s picture

Status: Active » Postponed (maintainer needs more info)

In fixing a different bug I discovered the image field can already handle multiple images, and so does mailsave to imagefield (mailsave to imagefield was a contributed module and I didn't realise it did this!) Just create one image field, but allow it to accept multiple values.

Go to Administer > Content management > Content types

Edit the content type that has the image field associated with it

Click on the Manage fields tab

Click configure for the image field

At the bottom of the form check "Multiple values" and save the field settings.

When you now retrieve message containing multiple images all the images in each message will be attached to the node.

Pretty neat! Is that an appropriate solution for you as it doesn't require multiple image fields or writing any code to process tags etc?

Stuart Greenfield’s picture

Status: Postponed (maintainer needs more info) » Fixed

I am setting this to "fixed" although no code changes were needed. I am assuming that as there has been no further post that the proposed solution of enabling an image field to accept multiple values was a reasonable solution.

Please re-open if more work is needed.

Note - as a spin-off of this thread the original "mailsave to image" module that creates actual image nodes is going to be upgraded to create multiple nodes from one message as this seems a useful feature!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.