If you have already set up reply via email, or you are on a hosting plan that pre-configures your incoming email, you’re now ready to set up Starting a New Topic via Email.
Site Settings
The incoming emails feature is globally controlled by these 3 site settings:
email_in
: this is the only setting that must be enabled for incoming emails to work.email in allowed groups
: a user must belong to this group in order to send an email to Discourse.enable_staged_users
: create staged users for unknown email addresses.
What are staged users?
In order to support incoming emails from anyone, we needed a way to create user accounts on the fly.
Unfortunately, we couldn’t use normal user accounts. They would start receiving digests and it would prevent people from signing up with the same email address (which was confusing since they only sent emails).That’s why we came up with the idea of staged users. They are special user accounts in Discourse.
They can’t be mentioned or searched for, they will never receive a digest and they can only be notified of and reply to the topics they started or were invited in.
If the user ever wants to create an user account using the same email address, we will promote the staged user to a normal user.
Category vs Group
So now that you have enabled incoming emails, you need to decide whether you want them to end up into a category
or a group
.
Why use a group?
- Using a
group
is useful if you want to set up a support-like workflow. - Sending an email to a
group
will create a message sent to all the members of that group. - These messages will appear in
/my/messages
. - Anyone can send an email to a
group
(since it’s just an email behind the scene) - Any member of the
group
may read, reply, delete or archive the message. - All member of the
group
have their own read tracking state.
Why use a category?
- Using a
category
is useful if you want to simulate a mailing list. - Sending an email to a
category
will create a topic in said category. - Anyone with access to that
category
may read and reply using the web interface or via email. - Emails sent to a
category
must respect the category’s security settings. - Emails sent to a
category
must respect theemail in allowed groups
site setting. - You may disable staged users on a per
category
basis.
Setting up incoming emails on a group
To setup incoming emails on a group, go to your groups page by clicking the “groups” link from the main menu, then click the name of the group (or create a new one).
If you have created a new group, at the bottom of the form, there should be a field named Custom incoming email address
. If there isn’t, make sure you have enabled the email_in
site setting.
Enter the email address you want to associate to that group
and click the Save button to save your changes.
If you are editing an existing group, click the group’s Manage tab, then click the Interaction link from the left side menu. You should see a Custom incoming email address
field near the bottom of the form:
If you are not seeing the field, make sure that you have enabled the email_in
site setting. Enter the email address you want to associate to that group
and click the Save button to save your changes.
Also note that more than one email address can be specified here, you’ll just need to separate the emails using |
.
If you are using a Discourse Hosted site the Accept incoming emails sent to:
checkbox is the default incoming email address Discourse will use for the selected group. You will need to check this box and forward your custom email(s) to this email address for email to message creation to function correctly.
You’re done
Setting up incoming emails on a category
To setup incoming emails on a category, you need to go to the category’s page (eg. /c/<category_slug>
) and click the Edit button.
Then, click the Settings
tab on the Edit category
modal that shows up.
There should be two fields “Accept emails from anonymous users with no accounts
” and “Custom incoming email address
”. If there aren’t, make sure you have enabled the email_in
site setting.
Enable “Accept emails from anonymous users with no accounts
” if you want staged users to be created when an incoming email address does not exists yet.
Similar to the Group → Interaction settings, if you are using a Discourse Hosted site the Accept incoming emails sent to:
checkbox is the default incoming email address Discourse will use for the selected category. You will need to check this box and forward your custom email(s) to this email address for email to topic creation to function correctly.
Enter the email address you want to associate to that category
and click the Save Category button to save your changes.
You’re done
For troubleshooting tips, see the Logging and Errors section of this topic.
Last Reviewed by @SaraDev on 2022-05-23T22:00:00Z