# Amazon SES API - How to setup?

**URL:** https://meta.discourse.org/t/amazon-ses-api-how-to-setup/139746
**Category:** Self-hosting
**Created:** [January 26, 2020, 10:18am UTC](https://meta.discourse.org/t/amazon-ses-api-how-to-setup/139746 "2020-01-26T10:18:22Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![customer22533](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@customer22533](https://meta.discourse.org/u/customer22533)
#### Post date: [January 26, 2020, 10:18am UTC](https://meta.discourse.org/t/amazon-ses-api-how-to-setup/139746/1 "2020-01-26T10:18:22Z")

</div>

I’m trying to use my discourse instance with the Amazon SES API, config as follows:

```plaintext
 DISCOURSE_SMTP_ADDRESS: email.eu-west-1.amazonaws.com
  DISCOURSE_SMTP_PORT: 443
  DISCOURSE_SMTP_USER_NAME: AKI_Access_key_ID
  DISCOURSE_SMTP_PASSWORD: apikey
  DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

```

* * *

No error in /var/discourse/shared/standalone/log/rails/production.log regarding aws.  
No email delivered, and no Identity and Access Management (IAM) Amazon SES Last activity.

Basically it isn’t reaching AWS API, really don’t know what to do, any suggestions?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [January 26, 2020, 10:30am UTC](https://meta.discourse.org/t/amazon-ses-api-how-to-setup/139746/2 "2020-01-26T10:30:23Z")

</div>

You’re using the wrong port. Try 25, 587, or 2587  
Ref: [Connecting to an Amazon SES SMTP endpoint - Amazon Simple Email Service](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-connect.html)

---

<div class="post-metadata">

### Author: ![customer22533](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@customer22533](https://meta.discourse.org/u/customer22533)
#### Post date: [January 26, 2020, 11:13am UTC](https://meta.discourse.org/t/amazon-ses-api-how-to-setup/139746/3 "2020-01-26T11:13:41Z")

</div>

I’m trying to use the Amazon SES **API** not the SMTP.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [January 26, 2020, 12:57pm UTC](https://meta.discourse.org/t/amazon-ses-api-how-to-setup/139746/4 "2020-01-26T12:57:01Z")

</div>

Sorry, can’t use API as SMTP for discourse.

---

<div class="post-metadata">

### Author: ![customer22533](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@customer22533](https://meta.discourse.org/u/customer22533)
#### Post date: [January 26, 2020, 5:30pm UTC](https://meta.discourse.org/t/amazon-ses-api-how-to-setup/139746/5 "2020-01-26T17:30:41Z")

</div>

Yeah, I just realized that. That’s too bad because I can’t seem to manage setting up the bounce emails to appear in the Bounced section of Discourse, which causes emails to be sent to nonexistent emails.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [January 26, 2020, 7:37pm UTC](https://meta.discourse.org/t/amazon-ses-api-how-to-setup/139746/6 "2020-01-26T19:37:50Z")

</div>

Here’s the solution You’ll need:

> [@Configure VERP to handle bouncing e-mails](https://meta.discourse.org/t/handling-bouncing-e-mails/45343):
>
> Setting up bounces handling Discourse uses the [Variable envelope return path (VERP)](https://en.wikipedia.org/wiki/Variable_envelope_return_path) technique to handle bouncing e-mails. To enable VERP, set the “reply by email address” site setting with an email address template that uses the + sign. The default of replies+%{reply\_key}@discourse.example.com … works fine. If you are using your own or your company’s email server, then, that’s it tada Your discourse instance must be able to receive email sent to this address. This should work via POP, bu…

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [December 11, 2023, 1:47am UTC](https://meta.discourse.org/t/amazon-ses-api-how-to-setup/139746/7 "2023-12-11T01:47:21Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [January 10, 2024, 1:48am UTC](https://meta.discourse.org/t/amazon-ses-api-how-to-setup/139746/8 "2024-01-10T01:48:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
