# Email transport adapters

**URL:** <https://discourse.getcockpit.com/t/email-transport-adapters/1645>\
**Category:** Support\
**Created:** [September 21, 2020, 8:13pm UTC](https://discourse.getcockpit.com/t/email-transport-adapters/1645 "2020-09-21T20:13:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danieljwestman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/danieljwestman/32/687_2.png) [@danieljwestman](https://discourse.getcockpit.com/u/danieljwestman)\
**Post date:** [September 21, 2020, 8:13pm UTC](https://discourse.getcockpit.com/t/email-transport-adapters/1645/1 "2020-09-21T20:13:30Z")

</div>

Which email adapters can I use within Cockpit? Would be nice to use Mailjet or Mailgun. How can I accomplish this?

Thanks!

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [October 4, 2020, 10:43am UTC](https://discourse.getcockpit.com/t/email-transport-adapters/1645/2 "2020-10-04T10:43:59Z")

</div>

Cockpit uses `PHPMailer` with a small `Mailer` class as a wrapper. The default use case is to use smtp with a hoster of your choice.

You could override it if you set a custom mailer service via `config/bootstrap.php` or with an addon.

Resources:

> <https://github.com/agentejo/cockpit/blob/next/bootstrap.php#L215-L226>

> <https://github.com/agentejo/cockpit/blob/next/modules/Forms/bootstrap.php#L306-L310>

> <https://github.com/agentejo/cockpit/blob/next/lib/Mailer.php>
