Welcome to the THELIA support and discusssion forum


Hi all,
with my module I was trying to attach a csv (or other structured data file) to the notification mail.
In the actual version of MailerFactory I didn't found a function with that kind of parameter.

Looking forward (to the next thelia update) the best way to follow is add a function to MailerFactory or rewrite the entire message into my listener where I've already stop the standard event propagation (ORDER_SEND_NOTIFICATION_EMAIL)?

Thank for your advise.


Last edited by meo (29-12-2017 12:01:29)


Instead of using sendEmailToShopManagers, you can use MailerFactory::createEmailMessage() to get a Swift_Message object, and use Swift_Message::attach() to attach your file to the message.

CQFDev | Sites, boutiques, modules, développement et intégration pour Thelia 1 et 2


Right, so simple! thanks.. now the trivia will be Json-serialize myobject and attach to the message.