How to set up Feishu's free SMTP service for your Discourse community

I was asked how to use an SMTP mail server, so I thought Iโ€™d share this recommendation for beginners. No ads, just helpful information!

Feishu (Lark) is a Chinese company that provides enterprises with a one-stop solution for workflow and work platforms. However, anyone can create an account and use its free services. Feishu offers SMTP services to free users, with a daily sending limit of 450 emails, amounting to nearly 15,000 free emails per month.

For a growing Discourse community administrator, this is incredibly valuable. You can use the free SMTP service provided by Feishu to set up your Discourse community, especially suitable for small and medium-sized Discourse communities with less than 150 active users.

Setting Up Feishu Mailbox

First, you need to register an enterprise account and log in. Note that the enterprise account information does not need to be for a real existing company; you can fill it in arbitrarily.

Part One: Enable Email Service

  1. Access the Admin Console:

  1. Navigate to Mail Settings:

    Click on Product Settings at the top.

Select Mail, then click Add Domain.

  1. Enter Your Domain:

    • In the popup window, enter your domain name.
    • Click the Submit button.
  2. Choose โ€œEnable New Mailbox Serviceโ€:

    • Select the option to enable a new mailbox service.
  3. Configure DNS Records:

    • Follow the instructions to configure the DNS records for your domain.
    • Go to your domain management (e.g., Cloudflare).
    • Add the necessary DNS records displayed by Feishu.

  1. Verify DNS Records:

    • Click the Verify Now button on the Feishu settings page.
      • If verification fails, double-check the records and wait a moment.
    • After verification is successful, click Next.
  2. Configure Mail Entry and Address:

    • Click the Configure Now button.
    • In the popup window, click Add (usually a red button or link to add a mailbox).
  3. Assign Mailboxes to Members:

    • In the member details window, find the corporate mailbox field.
    • Enter the mailbox address for the corporate member, then save.
  4. Complete Setup:

    • Return to the โ€œConfigure Mail Entry and Corporate Mailbox Addressโ€ page.
    • Click Finish to complete the setup.

Part Two: Configure a Public Mailbox for SMTP

  1. Access Public Mailbox Settings:

    • In the Feishu Admin Console, navigate to Product Settings โ†’ Mail โ†’ Public Mailbox.

  1. Create a New Public Mailbox:

    • Click Create Public Mailbox.
  2. Configure the Public Mailbox:

    • Enter the required Name and Address.
    • Enable IMAP/SMTP Services.
    • Click Create.
  3. View IMAP/SMTP Settings:

    • After creating the mailbox, find it in the list and click Edit.
      • Note down the provided IMAP/SMTP configuration information.

Configure the SMTP information into your Discourse server, and youโ€™ll have a free SMTP sending service with 450 emails per day and 15,000 emails per month!

3 Likes

Do you need to setup more than one domain email account? When I click on public there is no option to create/add new public mailbox.

This service though is quite awesome from what I have absorbed so far.

:clinking_beer_mugs: :smiling_face_with_sunglasses: :+1: :sparkles:

Perhaps you need to add your domain first? If you require setting up multiple domain email addresses, simply click the domain management button on the left to add a domain.

I followed all steps prior. Domain added with DNS records added.

Email send & receive works. Just when I click on Public Mailbox. It just is blank.

My bad using mobile it has the box much lower on main page for initial create. Thanks.

To enhance the credibility of emails sent from your domain, you must also add the DKIM DNS record here.

1 Like

Thanks for the pro tip. Really appreciate your help.

1 Like

With the SMTP username. Do I use the public mailbox username? Or the email address that I signed up with? There is an authentication error.

use the public mailbox username

1 Like

Okay I am getting an authentication error with discourse doctor in the email test.

I am able to send and receive emails on the private email address.

I will recheck SMTP password just in case.

Just wondering to eliminate the double reply. Do I need to rename โ€œinfo@nsfirehub.caโ€ to โ€œnoreply@community.nsfirehub.caโ€ and blankout discourseโ€™s noreply@domqin ?

So it only has โ€œFromโ€ & โ€œToโ€ without the extra โ€œReply toโ€

I am not entirely clear on how this issue arose, so I shall provide you with the SMTP configuration details from my app.yml file for your reference:

# WARNING the char '#' in SMTP password can cause problems!
  DISCOURSE_SMTP_ADDRESS: smtp.larksuite.com  #The SMTP server address
  DISCOURSE_SMTP_PORT: 587  
  DISCOURSE_SMTP_USER_NAME: system@starorigin.net   #Default Sending Email Address 
  DISCOURSE_SMTP_PASSWORD: abcdef   #The default SMTP password must be entered accurately.
  DISCOURSE_SMTP_ENABLE_START_TLS: true          
  #DISCOURSE_SMTP_DOMAIN: discourse.example.com    # (required by some providers)
  DISCOURSE_NOTIFICATION_EMAIL: system@starorigin.net    # (The default notification email address)
1 Like

Okay thanks. I need to rename the public mailbox user to match the siteโ€™s noreply.

This should solve it. Thanks for sharing the solution.

1 Like