New Mergen 2.3.10 is out: Hosting customer panel matches the demo, wide cinema layout for the video hero Release notes
Mergenv2.3.10
Search the docsCtrlK TR
Mergen

Email and SMTP

Applies to version: 2.3.10 11 min read Updated: 17 November 2026

All emails your site sends (registration, password reset, orders, license delivery, appointment confirmations and reminders, quotes, support, contact form, newsletter confirmation) are managed on the Mergen › Theme settings › Email tab. This is where you set your sender details, your SMTP server, the branded logo template and the sending log.

Goal

  • Make sure emails arrive without landing in the spam folder.
  • Send every email with the same design, using your logo and color.
  • See whether an email was sent and, if not, why.

Why SMTP?

By default, WordPress sends emails with the server's PHP mail() function. On shared servers these emails are unauthenticated, so they often land in spam or never arrive at all. With SMTP, emails are sent through your own email account, authenticated with a username and password; Gmail, Outlook and Yandex trust these emails.

Caution: On a store or appointment site without SMTP, customers may not receive order, license key and appointment confirmation emails. Always set up and test SMTP before launching the site.

Prerequisites

An email account and its SMTP details:

  • An email address on your domain (e.g. [email protected]) — your hosting provider's email, Google Workspace, Microsoft 365, Yandex 360, Zoho and so on.
  • Or a transactional email service (Brevo, SendGrid, Mailgun, Amazon SES).
  • The account's SMTP server name, port, encryption type, username and password. Gmail and Microsoft 365 require an app password instead of your normal password.

1. Sender details

  1. Open Mergen › Theme settings and switch to the Email tab.
  2. In the Sender group (1):
    • Sender email: an address that is the same as your SMTP account (or allowed on that account), e.g. [email protected]. If you enter a different address, the server may reject the email or it may land in spam.
    • Sender name: the name shown in emails. If empty, the site name is used.
    • Apply mode: Only if it is the WordPress default (plugins' own sender settings are kept; recommended) or Force on every email (all emails, including WooCommerce's, go out with this sender).
      Sender settings
      Theme settings › Email › Sender (1). Turkish interface shown.

2. SMTP server

  1. In the SMTP server group, turn on the Send emails via SMTP switch. When it's off, the server's PHP mail() function is used.
  2. Choose your provider from the Preset list. When you choose one, the server, port and encryption fields fill in automatically.
  3. Fill in the Username (usually your full email address) and Password fields.
  4. Click Save in the bar at the bottom.
    SMTP settings
    Email › SMTP server: preset, server, port, encryption, username and password. Turkish interface shown.
Preset Server Port Encryption Note
Gmail / Google Workspace smtp.gmail.com 587 TLS 2-step verification + app password
Outlook / Microsoft 365 smtp.office365.com 587 TLS SMTP AUTH must be enabled on the account
Yandex 360 smtp.yandex.com 465 SSL App password
Yaani Mail, Zoho Mail Filled in by the preset 465/587 SSL/TLS
Brevo, SendGrid, Mailgun, Amazon SES Filled in by the preset 587 TLS Enter the service's SMTP key as the password
cPanel / Plesk (hosting mail) mail.yourdomain.com 465 or 587 SSL / TLS Shown in your hosting control panel
Local server (localhost:25) localhost 25 None If Postfix/Exim runs on the server; authentication is usually not needed

Note: The password is stored encrypted in the database. If you prefer, define it with the MERGEN_SMTP_PASS constant in wp-config.php; then it is never kept in the panel, and the field shows "defined with a wp-config.php constant".

Turn on the Skip certificate verification option only for mail on your own server (e.g. cPanel with a self-signed certificate), and only if you get a certificate error.

App password for Gmail

  1. In your Google account, turn on Security › 2-Step Verification.
  2. Create a new password on the Security › App passwords page (name: "Website").
  3. Paste the 16-character password you are shown into the Password field in Mergen.

On Microsoft 365 and Yandex, you create an app password in a similar way from your account's security settings.

3. Send a test email

  1. In the Send test email box on the Email tab, enter your own email address in the Recipient field.
  2. Click Send test email. Sending takes up to ~20 seconds.
  3. Read the result:
    • "The server accepted the email" → check your inbox (and the spam folder).
    • If there is an error, Mergen diagnoses the problem step by step: did the server name resolve, is the port open, did the SSL handshake succeed, did authentication pass. Under each error it tells you what to do.
Error Meaning Solution
Host name not found Typo or DNS problem Enter the server name without http:// (e.g. smtp.gmail.com); choose it from the preset.
SSL/TLS mismatch The encryption type doesn't match the port SSL for port 465, TLS for 587, usually "None" for 25.
Could not connect to port The hosting provider has closed the port Have your provider open outbound 465/587, or use the provider's SMTP server.
Authentication failed Wrong username or password Enter the username as the full email address; use an app password on Gmail/Microsoft/Yandex.
Too many tests Too many attempts in a short time Wait a few minutes.

The status line at the top of the screen always shows the current sending route: "SMTP active: smtp.gmail.com:587" or "SMTP off — using PHP mail()". If another email plugin (e.g. an SMTP plugin) is active, this is noted too; in that case the plugin handles the site's normal sending.

4. Brand template

All emails are sent in the same template with your logo and color.

  1. In the Brand template group, turn on Send emails with the branded logo template.
  2. Email logo: if empty, the site logo is used. PNG or JPG is recommended; many email programs don't show SVG.
  3. Choose the button and heading color with Use the theme's primary color or Template color.
  4. Footer text: if empty, "This email was sent by {site}." {site} outputs the site name and {url} the site address.
  5. Add a plain-text alternative: recommended for email programs that don't display HTML and for spam filters.
  6. Check the result with Preview template, then save.
    Brand template
    Email › Brand template: logo, color, footer and plain-text alternative. Turkish interface shown.

A customer email sent with the template looks like this:

Email sent to a customer
Customer email with the brand template: 'Your quote request has been received'. Turkish content shown.

Notifications sent to you (the administrator) use the same design:

Administrator notification
A 'New appointment' notification sent to the administrator. Turkish content shown.

5. Email log

  1. In the Email log group, turn on Log sent emails and choose the Retention period.
  2. If you like, turn on Store content so emails can be resent. For security, the content of emails containing password reset and account activation links is never stored.
  3. The log table shows each email's recipient, subject, time and result (Sent / Failed). It has a Status filter (All, Sent, Failed), a search box (recipient or subject), and Refresh and Clear log buttons.
  4. A failed row shows the error message returned by the server. You can send emails whose content was stored again with Resend.
    Email log
    Email › Email log: recipient, subject, time and result. Turkish interface shown.

Tip: When a customer says "I didn't get the email", first search for their address in the log. If it says "Sent", the email left your server; ask the customer to check their spam folder. If it says "Failed", the error message tells you why.

6. Staying out of the spam folder

SMTP alone may not be enough. Add the three records your email provider gives you to your domain's DNS settings (in the panel of the company you bought the domain from, or Cloudflare's):

  • SPF — states which servers may send email on your behalf.
  • DKIM — digitally signs emails.
  • DMARC — states what to do with emails that fail SPF and DKIM.

The record values are on your provider's help page. Also make sure the sender email and the SMTP account are the same.

If the theme changes

SMTP sending and the email log live in the Mergen Core plugin. Even if you switch from Mergen to another theme, your emails keep going out with the same settings; in that case the settings appear on the Settings › Email (Mergen) screen. See Mergen Core and your data.

Emails your site sends

The table below shows the main emails sent by Mergen and Mergen Core, who they go to and where to edit their texts. All of them are sent with the brand template and written to the email log.

Email Recipient When? Where to edit the text
Registration / welcome, password reset Member Registration and forgot password WordPress default (translation file)
Order received, processing, completed Customer Order statuses WooCommerce › Settings › Emails
Your order has been delivered — your license keys Customer When a key is assigned Store delivery settings
Low key stock Administrator When available keys drop to the threshold —
Your appointment request was received / confirmed / cancelled / reminder Customer Appointment steps Appointments › Settings › Notifications and texts
New appointment Administrator and specialist New appointment Same screen
Your quote request was received / New quote request Customer / administrator When a quote is submitted Corporate › Quote form › Submission
Callback request, contact form Administrator When the form is submitted The related block settings
New job application Administrator When an application arrives —
Support: new ticket, ticket received, replies, status, assignment, guest verification Customer / team Support steps Support › Email templates
Newsletter subscription confirmation Subscriber If double opt-in is on —

Tip: Before going live, send yourself one email of each type in the table (a test order, a test appointment, a test ticket) and check that they all show Sent in the Email log.

Configuring with wp-config.php

If you manage several sites or don't want to keep passwords in the panel, you can define the SMTP settings with constants in wp-config.php. Fields defined with a constant show "defined with a wp-config.php constant" in the panel and can't be changed there. The most commonly used one is the password:

define( 'MERGEN_SMTP_PASS', 'your-app-password' );

Tips by provider

  • Your hosting provider's email (cPanel / Plesk): The easiest start. Create an email account in your hosting control panel (e.g. [email protected]); the server name is usually mail.yourdomain.com, with port 465 (SSL) or 587 (TLS). The daily sending limit may be low; prefer a transactional email service for large stores.
  • Google Workspace / Gmail: An app password is mandatory. Emails sent with a free Gmail account go out from a @gmail.com address; to send with your own domain, you need Google Workspace.
  • Microsoft 365: The Authenticated SMTP option must be enabled for the user in the admin center; if it's off, you'll get an "authentication failed" error.
  • Brevo, SendGrid, Mailgun, Amazon SES: Suitable for high-volume sending and detailed delivery reports. Verify your domain in the service's panel (SPF and DKIM records) and enter the SMTP key you are given in the password field.
  • Local server: If Postfix or Exim runs on your own VPS, choose the Local server (localhost:25) preset; make sure your reverse DNS (PTR) and SPF records are correct.

Tip: Whichever provider you choose, keeping the Sender email and the SMTP username the same is the single setting that improves delivery the most.

Common mistakes

Symptom Cause Solution
"Authentication failed" The normal password was used Create an app password on Gmail/Microsoft/Yandex.
"Connection timed out" The port is closed Have your hosting provider open outbound 465/587.
Emails land in spam SPF/DKIM missing or a different sender address Add the DNS records; make the sender email the same as the SMTP account.
The test passes but WooCommerce emails go out from a different address or are rejected WooCommerce's own sender address differs from the SMTP account Set the Apply mode to Force on every email, or fix the sender address under WooCommerce › Settings › Emails.
The logo doesn't show in emails SVG logo Upload a PNG as the Email logo.
Settings can't be changed wp-config.php constants are in use Edit the constants in wp-config.php.

Related sections

Was this page helpful?Your answer helps us improve this page.
Do not include your name, email, phone number, password or license key in your comment.