How to Configure SMTP on n8n Using a cPanel Email & Add a DMARC Record

Follow this step-by-step guide to send emails from n8n using a cPanel-based email account—and avoid deliverability issues by setting up a DMARC record.


:wrench: Step 1: Create an Email Account in cPanel

  1. Log in to your cPanel dashboard.

  2. Click Email Accounts.

  3. Create a new email (e.g., [email protected]) and set a strong password.

  4. Save the password somewhere safe.

  5. Open the inbox. You’ll find a welcome email with configuration details—you’ll need those for SMTP setup.


:jigsaw: Step 2: Set Up SMTP in n8n

  1. Open n8n, create a new workflow.
  2. Add a “Manual Trigger” node (for testing).
  3. Add a “Send Email” node.

Inside the Send Email Node:

  1. Click “Create new credential” under the SMTP settings.

  2. Fill in the fields as follows:

    • User: Your full email address (e.g., [email protected])
    • Password: The password you created in cPanel
    • Host: The Outgoing Server URL from your email configuration (e.g., mail.domain.com or sub.domain.com)
    • Port: Typically 465 (make sure it’s the outgoing SMTP port, not the incoming one)
    • SSL/TLS: Leave this enabled
    • Client Hostname: Use the same value as the host (e.g., mail.domain.com)
  3. Click Save.


:shield: Step 3: Add a DMARC Record for Deliverability

Setting up DMARC improves your sender reputation and protects your domain from spoofing.

Why DMARC Matters

Without it, scammers could spoof your email domain and send phishing messages under your name. Email providers may also block or flag your messages, reducing deliverability.

To Create a DMARC Record in cPanel:

  1. Go to cPanel > Zone Editor.

  2. Find your main domain (apex domain like domain.com) and click Manage.

  3. Click “Add Record”, then configure:

    • Name: _dmarc. (or _dmarc.subdomain. if your email is on a subdomain). This field autocompletes to fill the domain, so don’t panic when it does.

    • TTL: Leave as default

    • Type: TXT

    • Record:

      v=DMARC1; p=none; fo=1; rua=mailto:[email protected]
      

    Replace [email protected] with the actual email you’re using.

  4. Click Save Record.

:warning: Don’t worry about any warnings like “A record can’t have an underscore”—they disappear after we select type.


:stopwatch: Step 4: Wait for DNS Propagation

DMARC records can take up to 24 hours to propagate. Check the status using MXToolbox DMARC Lookup.


:mailbox_with_mail: Final Tips

  • In the “From Email” field in the n8n node, use the format:

    Your Name <[email protected]>
    

    This helps recipients see a proper sender name instead of the default “n8n” sender.

  • This guide focuses on cPanel, but the same concept applies to platforms like Cloudflare, Namecheap, or any DNS manager. Just:

    1. Find your SMTP config
    2. Add a DMARC record through your DNS settings

:tada: You’re all set! You’ve successfully configured SMTP on n8n and improved deliverability with DMARC.