Hi Steven,

I found this module and it looks complete but I think miss some example to get started?
If I understood well, it's linked to the "drupal_mail" function.

I have a module that send out mails to customers.
I want to use the mail queue module to allow delay the sending of the mails and give admins the option to remove mails. So your queue system seems perfect.

I have a customer module that dont use the default drupal_mail function but a compact 3rd party library (HtmlAttachmentEmail).

How can I add a mail from my module to the queue and give it a certain timestamp to indicate the processing time?
Is there a way to see the queue and delete items in the queue?

Comments

Steven Jones’s picture

Status: Active » Fixed

Hi,

I think that possibly Queue mail isn't exactly what you're after.

Queue mail is quite a low-level thing that just stops mail from being sent immediately in that page request, and instead pops it into a Drupal queue, for some other process to come along and send.

For your scenario, you'd need something else to come along an be able to inspect the queue and remove from the queue etc.

I'd suggest that you'd be better off having your system generate something else as an intermediate step, instead of an email, just a generic entity that can hold the data will do. You could then use Views and Views bulk operations to get an admin UI for these to allow deleting etc. Then you could have some other process that after some time, converts these entities into Emails and deletes them from that queue (could use Rules to do this last bit maybe?)

Hope that helps!

thim’s picture

Hi Steven,

Thanks for the clear input.

I was thinking of a stack of modules (like you suggested) to do all the logic and then I ran into your module.

So if I understand correct, your module is a plugin to overwrite the default drupal_mail function and use a queue to delay only. No interaction possibility, which works perfectly as intended but for my use case just not complete enough.

I thought there was maybe a function to add mails to the queue and that the queue stored the complete message.

So thanks for the input, I'll try to make a custom module that will use the mentioned modules to do the processing and managing.

Status: Fixed » Closed (fixed)

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