# Send email using API

**URL:** <https://forum.mautic.org/t/send-email-using-api/4893>\
**Category:** Product Support\
**Created:** [August 14, 2016, 9:23pm UTC](https://forum.mautic.org/t/send-email-using-api/4893 "2016-08-14T21:23:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mingo3369](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@mingo3369](https://forum.mautic.org/u/mingo3369)\
**Post date:** [August 14, 2016, 9:23pm UTC](https://forum.mautic.org/t/send-email-using-api/4893/1 "2016-08-14T21:23:52Z")

</div>

I am new to Mautic and still figuring out all my use cases. One of the consistent ways we use our current automation tool is using their API to send emails to groups, both marketing and transactional. In one case we have a group of subscribers who we send daily market data. The data is assimilated into html in different analysis tool, the marketing automation tool FETCH’s the html and then sends it to the subscriber list in an email. This happens daily and is kickedoff by a REST statement.

1. Can I send emails to Mautic segments via REST (preferably JSON) using the API?  
2. Can Mautic FETCH email HTML from other sources?

---

<div class="post-metadata">

**Author:** ![mingo3369](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@mingo3369](https://forum.mautic.org/u/mingo3369)\
**Post date:** [August 14, 2016, 9:23pm UTC](https://forum.mautic.org/t/send-email-using-api/4893/2 "2016-08-14T21:23:52Z")

</div>

I am new to Mautic and still figuring out all my use cases. One of the consistent ways we use our current automation tool is using their API to send emails to groups, both marketing and transactional. In one case we have a group of subscribers who we send daily market data. The data is assimilated into html in different analysis tool, the marketing automation tool FETCH’s the html and then sends it to the subscriber list in an email. This happens daily and is kickedoff by a REST statement.

1. Can I send emails to Mautic segments via REST (preferably JSON) using the API?
2. Can Mautic FETCH email HTML from other sources?

---

<div class="post-metadata">

**Author:** ![mingo3369](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@mingo3369](https://forum.mautic.org/u/mingo3369)\
**Post date:** [August 16, 2016, 1:33pm UTC](https://forum.mautic.org/t/send-email-using-api/4893/3 "2016-08-16T13:33:26Z")

</div>

If number 1 is a no, how are people kicking off emails programatically?

---

<div class="post-metadata">

**Author:** ![lakshminp](https://avatars.discourse-cdn.com/v4/letter/l/57b2e6/32.png) [@lakshminp](https://forum.mautic.org/u/lakshminp)\
**Post date:** [October 26, 2016, 1:22pm UTC](https://forum.mautic.org/t/send-email-using-api/4893/4 "2016-10-26T13:22:29Z")

</div>

The EmailModel.php inside EmailBundle contains various functions to send emails programmatically.

Ex:

`sendEmailToLists` sends email to all the contacts in a given segment(lead list).  
ref: [https://github.com/mautic/mautic/blob/staging/app/bundles/EmailBundle/Model/EmailModel.php#L871](https://github.com/mautic/mautic/blob/staging/app/bundles/EmailBundle/Model/EmailModel.php#L871)
