2

I have a custom module working as I want it to that sends external stakeholders emails depending on the items in the order. I am observing the sales_order_save_after event and checking if the order status is set to Processing.

All works good using

$emailTemplate->send($emailSendAddress, $emailSendName, $emailTemplateVariables);

Now, the 2 payment method modules we are using automatically set the order status to *Processing" upon validation of payment, and the emails are sent immediately, and I do notice some slight latency while getting to the Checkout Success page (could be my imagination as well!).

Long story short ... How do I add my emails to the new email queue feature that was introduced with CE 1.9.1? Should I create a cron script for my module?

1 Answer 1

2

In the class Mage_Core_Model_Email_Template you can see the method sendTransactional. This method adds transactional e-mails to the queue.

I'm not 100% sure, but I'd expect the e-mail to be added to the queue if you use that method or a modified version of it.

1
  • Hi Milan. Thanks, I didn't realise that...reading up on it now and will post back here.
    – maGz
    Commented Sep 30, 2015 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.