# Receive e-mails by Mailgun or SES

**URL:** <https://forums.rocket.chat/t/receive-e-mails-by-mailgun-or-ses/11317>\
**Category:** Community Support\
**Created:** [June 2, 2021, 11:12pm UTC](https://forums.rocket.chat/t/receive-e-mails-by-mailgun-or-ses/11317 "2021-06-02T23:12:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![honza.poboril](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/honza.poboril/32/2866_2.png) [@honza.poboril](https://forums.rocket.chat/u/honza.poboril)\
**Post date:** [June 2, 2021, 11:12pm UTC](https://forums.rocket.chat/t/receive-e-mails-by-mailgun-or-ses/11317/1 "2021-06-02T23:12:08Z")

</div>

Hello,  
in a docs and settings I see there is IMAP as an only option to receive e-mails (replies, omnichannel).

I use Mailgun for receiving e-mails at our domain which can be configuret to forward incoming e-mails or send them to a webhook. I could also use AWS SES to receive emails which supports bysically only the webhook way.

This approach has advantage in a speed - app does not need to check IMAP server periodically, it gets incomming message by HTTP immediately, so I would like to not deploy IMAP server.

Could Rocket.Chat be hacked somehow to use webhooks for receiving e-mails? I could also code some small lambda if it will be needed to convert it to some API call.

Using Rocket.Chat on our VPS.

---

<div class="post-metadata">

**Author:** ![john.crisp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/john.crisp/32/2711_2.png) [@john.crisp](https://forums.rocket.chat/u/john.crisp)\
**Post date:** [June 3, 2021, 8:01am UTC](https://forums.rocket.chat/t/receive-e-mails-by-mailgun-or-ses/11317/2 "2021-06-03T08:01:09Z")

</div>

Hi.

I’m sure you could use the API to add emails as messages, just the same as for any other type of message. It will just depends on how you read the email and decide where it gets directed etc.

> **[REST API](https://developer.rocket.chat/reference/api/rest-api)**

> [@honza.poboril](#):
>
> This approach has advantage in a speed - app does not need to check IMAP server periodically, it gets incomming message by HTTP immediately, so I would like to not deploy IMAP server.

Depending on the way you set IMAP up it’s almost instantaneous (it is on all my IMAP mail - I haven’t used POP in over 15 years!)

It might be far easier to just setup a IMAP server… ?

By all means make a proposal - you could open a NFR here and see if you get any support for the idea:

> **[GitHub - RocketChat/feature-requests: This repository is used to track...](https://github.com/RocketChat/feature-requests)**
>
> This repository is used to track Rocket.Chat feature requests and discussions. Click here to open a new feature request. - GitHub - RocketChat/feature-requests: This repository is used to track Roc...
