# 在服务器阻止出站端口25/465/587的情况下如何发送电子邮件

**URL:** <https://meta.discourse.org/t/how-to-send-emails-on-server-with-25-465-587-outbound-blocked/86309>\
**Category:** Product Support\
**Created:** [2018 年4 月 27 日 14:56 UTC](https://meta.discourse.org/t/how-to-send-emails-on-server-with-25-465-587-outbound-blocked/86309 "2018-04-27T14:56:57Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![Vencent](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vencent/32/120037_2.png) [@Vencent](https://meta.discourse.org/u/Vencent)\
发布日期： [2018 年4 月 27 日 14:56 UTC](https://meta.discourse.org/t/how-to-send-emails-on-server-with-25-465-587-outbound-blocked/86309/1 "2018-04-27T14:56:57Z")

</div>

Recently I switch my host provider to Google Cloud Platform. Everything works great until I found outgoing mail traffic is blocked by Google.

> Google Compute Engine does not allow outbound connections on ports 25, 465, and 587  
> See [Sending email from an instance &nbsp;|&nbsp; Compute Engine &nbsp;|&nbsp; Google Cloud Documentation](https://cloud.google.com/compute/docs/tutorials/sending-mail/) for detail.

Google advises using SendGrid, Mailgun, or Mailjet. However, since I didn’t see any Mailgun plugin for Discourse (two repo on GitHub indeed, but one hasn’t been updated since 2015, and the other even breaks the rebuild of Discourse), I formerly use SMTP to send emails via Mailgun, but this way has been blocked by Google. So my site’s email system is totally breaking down.

Is there any solution?

---

_[View the full topic](https://meta.discourse.org/t/how-to-send-emails-on-server-with-25-465-587-outbound-blocked/86309)._
