# How to send custom content email to each contact ? (willing to send product recommendations)

**URL:** https://forum.mautic.org/t/how-to-send-custom-content-email-to-each-contact-willing-to-send-product-recommendations/26556
**Category:** Product Support
**Created:** [December 31, 2022, 8:54am UTC](https://forum.mautic.org/t/how-to-send-custom-content-email-to-each-contact-willing-to-send-product-recommendations/26556 "2022-12-31T08:54:56Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dandumit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dandumit/32/6497_2.png) [@dandumit](https://forum.mautic.org/u/dandumit)
#### Post date: [December 31, 2022, 8:54am UTC](https://forum.mautic.org/t/how-to-send-custom-content-email-to-each-contact-willing-to-send-product-recommendations/26556/1 "2022-12-31T08:54:56Z")

</div>

**Your software**  
My Mautic version is:v4.4.5  
My PHP version is:7.4.32  
My Database type and version is:5.7.40

**Your problem**  
I need to send product recommendation’s to each contact . Content will be generated by a product recommendation engine based on each user browsing history .  
Could someone tell me how to create email using API ? Is there any example available?

Thank you,  
Daniel

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [December 31, 2022, 4:08pm UTC](https://forum.mautic.org/t/how-to-send-custom-content-email-to-each-contact-willing-to-send-product-recommendations/26556/2 "2022-12-31T16:08:58Z")

</div>

Hi,  
You can send email via API:  
[https://developer.mautic.org/#send-email-to-contact](https://developer.mautic.org/#send-email-to-contact)

Joey

---

<div class="post-metadata">

### Author: ![asad786](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/asad786/32/8990_2.png) [@asad786](https://forum.mautic.org/u/asad786)
#### Post date: [January 9, 2023, 4:54am UTC](https://forum.mautic.org/t/how-to-send-custom-content-email-to-each-contact-willing-to-send-product-recommendations/26556/3 "2023-01-09T04:54:27Z")

</div>

You can create email using API via this API:

[https://developer.mautic.org/?&\_ga=2.15113151.821070042.1672995917-409162151.1672663958#"emails-in-time"-widget](https://developer.mautic.org/?&_ga=2.15113151.821070042.1672995917-409162151.1672663958#%22emails-in-time%22-widget)

And send that email to particular contact via this:

[https://developer.mautic.org/?&\_ga=2.78575517.821070042.1672995917-409162151.1672663958#send-email-to-contact](https://developer.mautic.org/?&_ga=2.78575517.821070042.1672995917-409162151.1672663958#send-email-to-contact)

Thank You

---

<div class="post-metadata">

### Author: ![dandumit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dandumit/32/6497_2.png) [@dandumit](https://forum.mautic.org/u/dandumit)
#### Post date: [February 19, 2023, 6:15pm UTC](https://forum.mautic.org/t/how-to-send-custom-content-email-to-each-contact-willing-to-send-product-recommendations/26556/4 "2023-02-19T18:15:50Z")

</div>

Thank you @asad786 and @joeyk .  
I am making my firsts steps on mautic api and it seems to be a step curve.

I have found also that I can achieve what I want using

[https://developer.mautic.org/#extending-emails](https://developer.mautic.org/#extending-emails)

I am a bit concerned about the end since for me it’s not working a simple filtering for now…

Thank you !  
Daniel

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [February 20, 2023, 12:49pm UTC](https://forum.mautic.org/t/how-to-send-custom-content-email-to-each-contact-willing-to-send-product-recommendations/26556/5 "2023-02-20T12:49:15Z")

</div>

Hi, I would go a different route.

1. I would get the Twig Templates Plugin, which can transform a JSON content (your recommended rpoducts) into html.
2. Push in the JSON to each contact via API.
3. Create an Email with the Twig Template in there.
4. Send a out the campaign

> **[Examples of the best selling Twig Templates plugin](https://mtcextendee.com/2021/12/06/examples-of-the-best-selling-twig-templates-plugin/)**
>
> Do you know what is the best selling plugin from our marketplace? It’s Twig Templates plugin. The reason is probably great flexibility of Twig markup language. Let’s take inspiration an…
