Setting up Oracle Cloud’s free SMTP service for your Discourse community

Introduction

Setting up Oracle Cloud’s free SMTP service for your Discourse community is a great way to manage and automate email notifications without incurring high costs.
When using Oracle Cloud Infrastructure (OCI) servers, you not only have access to common services such as computing and storage, but also to OCI’s Email (SMTP) service, which helps developers and businesses send emails from the cloud. Oracle offers a free quota of up to 200 email sends per day and 6,000 per month for free-tier users, while paid users are charged at a rate of USD 0.85 per 10,000 emails—an extremely cost-effective option.

This guide will provide a detailed explanation of how to configure and use Oracle’s Email SMTP service, including account setup, DNS configuration, obtaining SMTP credentials, and configuration examples for common clients.


1. Preparations

Before you begin, make sure of the following:

  1. A valid Oracle Cloud Infrastructure account
    If you do not have an OCI account yet, you must register and activate services first.

  2. A target email address or domain
    When using the OCI Email Delivery service, you typically need either a custom domain or a test email address for sending messages.


2. Creating and Configuring the Email Delivery Service

  1. Access the Oracle Cloud Console
    Log in to Oracle Cloud Console and find the Email Delivery service in the menu.

  2. Configure your email domain

    • To improve deliverability and credibility, add SPF and DKIM records.
    • In the domain’s DNS settings, follow Oracle’s instructions to add the required TXT and CNAME records.
    • Create your email domain.

After creating the email domain, open your newly created domain interface. You will find three important configuration sections. These records ensure the trustworthiness of your emails and reduce the likelihood of being flagged as spam:

  • Create a DKIM entry and add the DNS record.
  • Enter a custom selector (for example, “beijing-20250301”).
  • Generate a DNS record and add it in your DNS management tool (like Cloudflare).
  1. Add a custom Return-Path
    Generate a CNAME record for your return path and add it to your DNS. Ensure it’s valid and active.

Once everything is correctly set up, you should see green indicators confirming successful configuration.

  1. Create an Approved Sender
    • In Email Delivery, go to Approved Senders.
    • Click Create Approved Sender.
    • Enter the email address you want to use (e.g., noreply@yourdomain.com) and add it to the approvals list.

3. Obtaining SMTP Credentials

OCI uses “SMTP Credentials”—similar to a username and password—to manage sending permissions. Here’s how to get them:

  1. Go to User Settings

    • In the top-right corner, click your profile, then select User Settings.
  2. Generate SMTP Credentials

    • Select SMTP CredentialsGenerate SMTP Credentials.
    • The system will generate a Username and Password; be sure to save them or download them right away.
    • Keep your SMTP password secure. It’s only shown once when first generated.

4. Retrieving SMTP Configuration

Access your Email Delivery service to find:

  • The SMTP server hostname.
  • The SMTP port (587 is recommended).
  • TLS is required.
  • The username and password you just generated.

5. Testing the SMTP Sending Service

Use a tool such as GMass SMTP Test. Enter the credentials you obtained in the previous step—Server, Port (587), Security (TLS)—and the email address you’ve set as your sender (e.g., system@sufe.me). Use any valid email address as the recipient for a test. If you receive the email, your setup is successful.

3 Likes