Mail dispatch
Introduction
This guide explains how to set up e-mail dispatch in 21.Shop. You choose whether the shop sends e-mails such as order confirmations and notifications via the standard dispatch, SMTP, or Microsoft mail dispatch (OAuth).
Microsoft no longer permanently supports signing in with username and password via SMTP for Microsoft 365 / Outlook. For Microsoft accounts, use Microsoft mail dispatch instead.
Why is your own mail dispatch important?
So that your online shop can reliably send e-mails on your behalf, dispatch should run through your mail provider. This improves deliverability and helps prevent messages from ending up in the spam folder. E-mails with your own sender address also look more professional.
Most shop e-mails are sent via the queue. This keeps the administration usable even if the mail server responds slowly or is temporarily unavailable.
Where to find the settings
- Open the shop administration of 21.Shop.
- Go to “Settings” → “General”.
- Open the “Shop operator / VAT” tab.
- Scroll to the box “Settings for own mail dispatch”.
Choose the mail dispatch type
Under Mail dispatch type, three options are available:
| Option | When to use it |
|---|---|
| Standard mail dispatch | Basic dispatch via the server (PHP mail). Often less reliable. |
| Use SMTP mail dispatch | Other mail providers with host, port, username and password (e.g. many hosting providers or Gmail). |
| Use Microsoft mail dispatch | Microsoft 365, Outlook.com and Exchange Online – recommended if you use Microsoft as your mail provider. |
SMTP and Microsoft mail dispatch are mutually exclusive: saving one option deactivates the other.
Set up Microsoft mail dispatch
Use this option if you want to send e-mails via Microsoft. The shop connects to Microsoft via OAuth and sends messages through the Microsoft interface (no longer via classic SMTP with a password).
Step 1: Activate Microsoft mail dispatch
- Under Mail dispatch type, select “Use Microsoft mail dispatch”.
- Click “Sign in to mail server”.
- Sign in with your Microsoft account in the window that opens and grant the required permissions.
- On success, the message “The connection was established successfully." appears.
If the connection needs to be renewed later, use the link “Sign in to mail server again”.
Step 2: Send a test e-mail and save
After a successful sign-in, the “Test e-mail dispatch” window opens.
- Check the sender. Use an e-mail address allowed by Microsoft (usually the address of the connected account).
- Enter a recipient that you can access.
- Click “Send test e-mail”.
- When the test e-mail arrives, click “Save”.
The sender address is then also applied to the fields “E-mail address for orders” and “E-mail address for contact”.
You can send another test e-mail at any time via the “Test e-mail” field and the “send” button.
Step 3 (optional): Use your own app registration
For special setups, you can store your own Microsoft app registration instead of the standard sign-in:
- Click “Use own app registration”.
- Enter the Client ID, Client Secret and Tenant ID from the Microsoft Azure portal.
- Save the settings.
- Then send a test e-mail.
For most shops, signing in via “Sign in to mail server” is sufficient. Your own app registration is only needed if you want to connect Microsoft specifically with your own company app.
Set up SMTP mail dispatch
Use SMTP if your mail provider still offers host, port, username and password (not Microsoft 365 with basic auth disabled).
- Under Mail dispatch type, select “Use SMTP mail dispatch”.
- Fill in the fields:
| Field | Description |
|---|---|
| SMTP host | Address of the SMTP server (e.g. mail.example.com) |
| SMTP port | Usually 587 (STARTTLS) or 465 (SSL/TLS) |
| SMTP username | Often your e-mail address. Must match the e-mail addresses for orders and contact. |
| SMTP password | Password or app password of your mail account |
- Enter a recipient address under “Test e-mail” and click “send”.
- Save the settings once the test e-mail arrives.
For Gmail, you will find additional information via the “Gmail infos” link next to the host field.
Check sender addresses
Make sure the following addresses match your chosen mail dispatch:
- “E-mail address for orders”
- “E-mail address for contact”
With Microsoft mail dispatch, the sender must be allowed to send from the connected Microsoft account or tenant. Otherwise you may see a message that the sender address is invalid.
You edit the texts of shop e-mails under “Contents” → “E-mails” – see E-mail editor.
Tips for troubleshooting
- Connection is not yet established correctly: Sign in again via “Sign in to mail server”.
- Test e-mail does not arrive: Check the spam folder, the sender address, and whether the connection or SMTP data has been saved correctly.
- Sender address invalid: Use an address that your mail provider has authorised for sending.
- Microsoft / Outlook: Use Microsoft mail dispatch instead of SMTP with a password.
Further help
If you have any questions or problems, our support team will be happy to help. To do so, open a support ticket:
- Go to the Swiss21 portal.
- Click on your profile picture in the top right corner.
- Click on “Support”.
- Click on “Contact support”.
- Fill out the form and our support team will get back to you as soon as possible.
Support opening hours: Monday – Friday I 8:00 a.m. – 12:00 p.m. I 1:30 p.m. – 5:00 p.m.
