Page 1 of 1

Return Email Data

Posted: 05 Nov 2015, 19:14
by Luke
Hi,

Our client wants us to send emails via Mandrill. I was wondering if there was a way to get the raw data from the Email templates to send to Mandrill - there are a lot of config files to battle with and I don't know where to start!

I had tried just overwriting the templates but they changed the scope and want Mandrill to handle all the emailing!

Please let me know ASAP, client is breathing down my neck!!

Thanks

Re: Return Email Data

Posted: 05 Nov 2015, 20:55
by aimeos
Luke wrote: Our client wants us to send emails via Mandrill. I was wondering if there was a way to get the raw data from the Email templates to send to Mandrill - there are a lot of config files to battle with and I don't know where to start!
If I understand Mandrill correctly, it's a service for sending e-mails over their infrastructure using SMTP or their API. When you use Mandrills SMTP servers, you can simply configure Laravel to use them: http://laravel.com/docs/5.1/mail

In case you want to do something special and handing all data over via their API (at least I guess this could be done), you would have to replace the Aimeos mail adapter with one that talks directly to the API.

Re: Return Email Data

Posted: 06 Nov 2015, 09:30
by Luke
Hi,

You can also post data and allow Mandrill to format the email for you using a template & tags. This would be preferable to sending the email via our own sever. So if possible I would like to get all the order data out and post it to Mandril, rather than send an email

Thanks

Re: Return Email Data

Posted: 06 Nov 2015, 10:16
by aimeos
That's possible if you create a new Client_Html_Email_{Payment,Delivery,Account,Watch} class which pushes the data in the process() method to Mandrill via their API. The current order item which can also be used to get the rest of the data is available via $view->extOrderItem in the available view.