Brazil's biggest MU Online portal — since 2003
Tutorial Beginner Server

How to set up SMTP email on your MU Online server website

Complete guide to configuring SMTP email on your MU Online server website: what SMTP is and why it's needed (password recovery, account activation, admin notifications), how to choose a sending email address (from your domain vs a free service), what SMTP settings you need from your provider (host, port, security type, credentials), step-by-step configuration for the most common MU server web systems, how to use Gmail and Outlook as free SMTP relays (with the modern app password method), how to test if emails are actually being delivered, why emails go to spam and how to fix it (SPF, DKIM, DMARC records), and common SMTP errors with solutions.

RO Rodrigo · Updated on Aug 3, 2015 · ⏱ 12 min read
Quick answer

Email configuration is one of the most overlooked steps when setting up a MU Online server website. Without it, players can't recover passwords, new accounts can't be activated, and you miss important server alerts.

Email configuration is one of the most overlooked steps when setting up a MU Online server website. Without it, players can't recover passwords, new accounts can't be activated, and you miss important server alerts.

Nota: This guide is about the website's email (PHP sending mail via SMTP). The MuServer game itself doesn't send emails — only the web portal does. If you have no website, you don't need this configuration.

Why the website needs SMTP

WHAT SMTP EMAIL IS USED FOR ON A MU SERVER WEBSITE:

PLAYER-FACING FEATURES:
→ Password recovery: player clicks "Forgot password" → site sends reset link via email
→ Account activation: new registration requires email confirmation
→ Security alerts: "A new login to your account from IP X.X.X.X"

ADMIN FEATURES:
→ Server down notifications (if your monitoring uses email alerts)
→ Donation confirmation receipts
→ Admin alerts when suspicious activity is detected

WITHOUT SMTP CONFIGURED:
→ Players who forget their password are permanently locked out
→ New registration flow is broken (if confirmation email is required)
→ Admin notifications silently fail
→ The PHP mail() function (no SMTP) is usually blocked by modern hosting
   — hosting providers block it to prevent spam abuse

What you need before starting

SMTP CREDENTIALS YOU NEED:

1. SMTP HOST (the mail server address):
   → Your domain's mail server: mail.yourdomain.com or smtp.yourdomain.com
   → Gmail: smtp.gmail.com
   → Outlook/Hotmail: smtp-mail.outlook.com

2. SMTP PORT:
   → 587 (TLS/STARTTLS) — use this by default
   → 465 (SSL) — if your provider specifically requires it
   → 25 — usually blocked on VPS; avoid

3. SMTP SECURITY TYPE:
   → TLS or STARTTLS (port 587) — modern standard
   → SSL (port 465) — older standard

4. USERNAME:
   → Usually the full email address: [email protected]
   → For Gmail: your full Gmail address

5. PASSWORD:
   → For your own mail server: your email account password
   → For Gmail: an App Password (NOT your Google account password)
   → For Outlook: an App Password (with 2FA enabled)

Getting SMTP credentials from common providers

OPTION A — YOUR HOSTING PROVIDER'S MAIL:

Most shared hosting (cPanel) includes email hosting.
This is the best option — same domain, professional look.

1. Log into cPanel → "Email Accounts" → Create Account:
   → Email: [email protected]
   → Password: strong password
   → Quota: 100 MB is more than enough for outbound-only

2. Click on the account → "Connect Devices" or "Email Client Configuration"
   → You'll see the SMTP settings: host, port, security type

3. Typical cPanel SMTP settings:
   SMTP_HOST = mail.yourdomain.com
   SMTP_PORT = 587
   SMTP_USER = [email protected]
   SMTP_PASS = (the password you set)
   SMTP_SECURE = tls

OPTION B — GMAIL FREE SMTP RELAY:

1. Google Account → Security → Enable 2-Step Verification
2. Security → App passwords → Select app: "Mail" → Select device: "Other (Custom name)"
   → Type: "MU Server Website" → Generate
3. Google shows a 16-character app password (e.g., abcd efgh ijkl mnop)
   → Use this (without spaces) as your SMTP password

   SMTP_HOST = smtp.gmail.com
   SMTP_PORT = 587
   SMTP_USER = [email protected]
   SMTP_PASS = abcdefghijklmnop   (the 16-char app password, no spaces)
   SMTP_SECURE = tls

DAILY LIMIT: Gmail allows ~500 emails/day via SMTP — sufficient for most servers.

Configuring in the MU web system

STEP BY STEP — COMMON WEB SYSTEMS:

MOST MU WEB SYSTEMS HAVE A CONFIG FILE OR ADMIN PANEL:

METHOD 1 — CONFIG FILE (common in PHP-based systems):
Open config.php, email.php, or smtp.php in the web system folder.
Add or update:

$smtp_host   = 'mail.yourdomain.com';
$smtp_port   = 587;
$smtp_user   = '[email protected]';
$smtp_pass   = 'YourSMTPPassword';
$smtp_secure = 'tls';
$from_email  = '[email protected]';
$from_name   = 'YourServerName Support';

METHOD 2 — ADMIN PANEL:
Some systems have a web-based admin area where you fill in the SMTP fields.
→ Log into the admin area → Settings → Email or SMTP
→ Fill in the same values from above
→ Save and test

PHPMailer (used internally by many systems):
$mail = new PHPMailer(true);
$mail->isSMTP();
$mail->Host       = 'smtp.gmail.com';
$mail->SMTPAuth   = true;
$mail->Username   = '[email protected]';
$mail->Password   = 'app_password_here';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port       = 587;

Testing email delivery

HOW TO TEST:

TEST 1 — PASSWORD RECOVERY TEST:
1. Register a test account with an email you control
2. Log out
3. Click "Forgot password" → enter the test account's email
4. Check if the reset email arrives (check spam folder too)
5. Click the reset link → verify it works

TEST 2 — PHP SMTP TEST SCRIPT:
Create test_email.php in the web root (delete after testing):

<?php
require 'path/to/phpmailer/PHPMailer.php';
$mail = new PHPMailer(true);
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = 'app_password';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->setFrom('[email protected]', 'MU Server Test');
$mail->addAddress('[email protected]');
$mail->Subject = 'SMTP Test';
$mail->Body = 'SMTP is working correctly.';
$mail->send();
echo 'Email sent!';
?>

If it shows "Email sent!" and you receive it: SMTP is configured correctly.
Atenção: Delete any SMTP test scripts (like test_email.php) after testing. These scripts contain your SMTP credentials and can be found by search bots scanning for exposed configuration files.

Fixing emails going to spam

WHY EMAILS GO TO SPAM AND HOW TO FIX IT:

STEP 1 — ADD SPF RECORD (tells servers your domain sends from here):
→ In your domain's DNS settings (Cloudflare, GoDaddy, etc.):
→ Add a TXT record:
   Name: @ (your domain root)
   Value: v=spf1 include:yourhostingprovider.com ~all
→ If using Gmail to send: v=spf1 include:_spf.google.com ~all

STEP 2 — ADD DKIM (cryptographic signature for your emails):
→ cPanel: "Email" → "Authentication" → "Enable DKIM"
→ This automatically creates the DKIM DNS record
→ For Gmail relay: Google handles DKIM automatically

STEP 3 — ADD DMARC RECORD (tells servers what to do with suspicious emails):
→ In DNS: add TXT record:
   Name: _dmarc
   Value: v=DMARC1; p=none; rua=mailto:[email protected]

RESULT:
→ With SPF + DKIM + DMARC: emails land in inbox instead of spam
→ Without them: email providers increasingly treat your messages as suspicious

Pair this guide with the website hosting tutorial (for the full setup of the server website where SMTP is configured), the account management tutorial (for handling password recovery requests manually when SMTP isn't available), and the server anti-hack tutorial (for monitoring admin notification emails about suspicious login activity).

Frequently asked questions

What is SMTP for on the server?

SMTP (Simple Mail Transfer Protocol) is the standard for sending email. Your MU Online website uses it to send automated emails: password reset links, account activation confirmations, and admin alerts when something goes wrong. Without SMTP configured, these emails are never sent — players who forget passwords can't recover their accounts, and new registrations can't be confirmed.

Can I use Gmail as the SMTP for my MU website?

Yes, but it requires an 'App Password' rather than your regular Gmail password. Google's security requires 2-Factor Authentication enabled on your account, then you generate an App Password specifically for the SMTP use. This App Password goes into your website config instead of your real password. It's free and reliable for low-volume email (under ~500 emails/day).

Why do my server's emails go to spam?

Several reasons: (1) The sending domain has no SPF record — email providers don't trust it. (2) No DKIM signature — the email isn't cryptographically verified. (3) No DMARC policy — the domain doesn't tell email providers what to do with suspicious messages. (4) The VPS IP is on a spam blacklist (common with cheap VPS providers). Setting up SPF and DKIM records resolves most spam issues.

What port should I use for SMTP?

Port 587 with TLS/STARTTLS is the modern standard for authenticated email sending. Port 465 with SSL is the older standard, still used by some providers. Port 25 is for server-to-server email and usually blocked on VPS providers. Use 587 as your first choice. If your provider's documentation says 465, use 465. Only use 25 if specifically required.

RO
Founder & editor-in-chief

Rodrigo has run ViciadosMU since the portal's early days. A specialist in MU Online server creation and administration, game history and the evolution of the seasons — he wrote much of the archive before 2024.

Keep reading

Related articles

🌍
Tutorial

How to host your MU Online server's website

Complete guide to getting your MU Online server's website online: the three hosting options (same VPS as the game / separate shared Linux hosting / local XAMPP or AppServ), how to upload files via FTP with FileZilla step by step, how to install the IonCube Loader in cPanel and in XAMPP, configuring the database connection in the site's config file (SQL Server and MySQL connection strings), setting folder permissions correctly (644 for files, 755 for directories, 777 for writable directories), how to troubleshoot blank pages and IonCube errors, linking the site to the game's player database so rankings and account registration work, and the security rules for the website database connection (dedicated user, never expose SQL port to internet).

12 min · Intermediate ·
📧
Tutorial

How to set up SMTP for account recovery in MU Online

Set up SMTP email delivery on your MU Online server website and implement a secure token-based password recovery flow, with PHPMailer, expiration and abuse protection.

20 min · Intermediate ·
🛡️
Tutorial

How to create a MU Online server (complete 2026 guide)

The complete beginner-friendly guide to creating a MU Online private server in 2026: what each component does (SQL Server, MuServer, the game client, the launcher, the website), the recommended technology stack for different seasons, the full step-by-step process from database installation through local testing and going online, network configuration for home servers (port forwarding, No-IP, Hamachi) and VPS servers, security essentials before opening to the public (strong passwords, closed SQL port, anti-hack), choosing the right season for your goals, what to expect in terms of time investment, and the most common first-server mistakes to avoid.

15 min · Advanced ·