Would be great if the module provided an email content type mimicking all the email fields, such as from, to, subject, body, and an admin view. :)

Comments

Dane Powell’s picture

Nice idea. Just curious, how exactly would you use this? I ask because in the rewrite for D8, I'm thinking of creating an "email" entity (instead of just a node content type). I'm wondering which would make more sense for most people.

giorgio79’s picture

I would like to forward emails based on the email content. (customer id). So, when the node gets saved, I just run a simple Rule like "After saving email node" check body, and if customer id found, forward email to customer...

In D7 I find entities very lacking. For the usual email fields I believe a content type is more than enough and the node system integrates with all Drupal modules unlike entities where you have to do a lot of custom coding.

oadaeh’s picture

So, I guess @giorgio79 is starting a movement to create email entity types: #2135635: Provide an email content type, so new mails can be saved, and we can use Rules to process mail and #1082412: Make messages nodes :^)

If it were done correctly, I think a generic email message entity type would be useful to more than one module. In addition to Basic webmail, I might even use it for Mass Contact too, which I was thinking of creating a custom entity type for.

Dane Powell’s picture

Yeah. Something like Message Notify might be able to use it as well.

It would require some careful planning and coordination to determine how granular it should be (should headers be stored all together or in separate fields), what the use cases are, and how the benefits of having a unified email entity would outweigh the burden of one more dependency.

Dane Powell’s picture

I've contacted oadaeh to see if it makes sense for us to coordinate on the next releases of Webmail and Mailhandler (#2001018: Plans for 8.x / transition from Feeds to Rules).