Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Lists inside recipient-variables when using Batch-send via Mailgun

Tags:

mailgun

I have following use case:

Batch-send invoice via Mailgun

Basically I need to combine these features: - recipient-variables so that every receiver gets personalized email - each recipient-variables contains list of ordered items - each item have properties like: Name, Price, Amount, etc

I know how to use simple variables like

 Dear <%recipient.FirstName%>, today is <%recipient.Date%>

But in this case the template is more complicated, something like this (pseudo-code)

 Dear <%recipient.FirstName%>, these are the ordered items:
 <%each recipient.Ordered
  <%item.Name%> ...... <%item.Amount%>, <%item.Price%>
 each%>

It is even possible with MailGun?

Or do I have to compose the emails myself, and then just pass it to MailGun one by one?

like image 322
David Votrubec Avatar asked Nov 17 '25 04:11

David Votrubec


1 Answers

You have to compose the emails yourself, and then just pass it to MailGun one by one.

like image 53
API_sheriff_orlie Avatar answered Nov 19 '25 16:11

API_sheriff_orlie