Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#2034 by Luke
05 Nov 2015, 19:14
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
#2036 by aimeos
05 Nov 2015, 20:55
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.
#2038 by Luke
06 Nov 2015, 09:30
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
#2039 by aimeos
06 Nov 2015, 10:16
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.