# Use a custom SMTP Mailserver

**URL:** <https://forum.ghost.org/t/use-a-custom-smtp-mailserver/15820>\
**Category:** Developer help\
**Created:** [July 13, 2020, 10:44am UTC](https://forum.ghost.org/t/use-a-custom-smtp-mailserver/15820 "2020-07-13T10:44:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![niwla23](https://avatars.discourse-cdn.com/v4/letter/n/b2d939/32.png) [@niwla23](https://forum.ghost.org/u/niwla23)\
**Post date:** [July 13, 2020, 10:44am UTC](https://forum.ghost.org/t/use-a-custom-smtp-mailserver/15820/1 "2020-07-13T10:44:31Z")

</div>

Hi,  
what is the correct config to use a custom (mailcow) mailserver? I can only find docs for SaaS mail providers, but I have my own mailserver so why should I use them?  
You need a “service” key there, but i cannot find documentation about possible values.

---

<div class="post-metadata">

**Author:** ![Stromfeldt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/stromfeldt/32/13572_2.png) [@Stromfeldt](https://forum.ghost.org/u/Stromfeldt)\
**Post date:** [July 13, 2020, 10:52am UTC](https://forum.ghost.org/t/use-a-custom-smtp-mailserver/15820/2 "2020-07-13T10:52:32Z")

</div>

I think this might answer your second question:

> **[Why do I have to set up Mailgun for newsletters?](https://ghost.org/docs/faq/mailgun-newsletters/)**
>
> Sending bulk email to many recipients using SMTP is not supported. In order to send newsletters from Ghost you'll need to setup Bulk Mail with Mailgun.

---

<div class="post-metadata">

**Author:** ![jackwxyz](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jackwxyz/32/8867_2.png) [@jackwxyz](https://forum.ghost.org/u/jackwxyz)\
**Post date:** [July 13, 2020, 6:34pm UTC](https://forum.ghost.org/t/use-a-custom-smtp-mailserver/15820/3 "2020-07-13T18:34:17Z")

</div>

While Mailgun is preferable, in my experimentation in fixing an email problem, I tried just about every mail config setting possible. I’ve found that removing the service config option and just including the SMTP server host and port, you can use it for transactional email. It won’t allow you to send email newsletters. That still requires mailgun, but setting an SMTP server will allow you to send staff emails and handle subscriber emails.

> “mail”: {  
> “transport”: “SMTP”,  
> “options”: {  
> “host”: “[smtp.mailgun.org](http://smtp.mailgun.org)”,  
> “port”: 587,  
> “auth”: {  
> “user”: “XXXXX”,  
> “pass”: “XXXXX”  
> }  
> }  
> },
