Setting up an SMTP server (for sending emails) can be done in different ways depending on whether you’re using a third-party provider (like Gmail, Outlook, etc.) or your own custom domain/server. Since you asked “only email setup”, here’s a step-by-step guide to setting up SMTP using Gmail and then a general method for a custom domain.
Option 1: Setup Gmail SMTP (Simplest for personal use)
Step-by-Step (Gmail SMTP):
-
- Enable 2-Step Verification on your Google Account:
- Go to: https://myaccount.google.com/security
- Turn on 2-Step Verification
- Enable 2-Step Verification on your Google Account:
-
-
Generate App Password:
- After 2-step is enabled, go to: https://myaccount.google.com/apppasswords
- Choose Mail as the app, Other or your device name.
- Google will give you a 16-character app password.
-
-
SMTP Settings for Gmail:
- SMTP Server:
smtp.gmail.com
- SMTP Port:
587
(TLS) or465
(SSL) - Username: your Gmail address (e.g.,
example@gmail.com
) - Password: the App Password you just generated
- Encryption: TLS or SSL (match the port)
- SMTP Server:
Option 2: Custom SMTP Server (e.g., using your domain via cPanel or VPS)
Step-by-Step:
-
-
Log in to your hosting provider or cPanel
-
Create an Email Account
- Go to Email Accounts
- Create a new email (e.g.,
noreply@yourdomain.com
) with a password.
-
-
-
Note the SMTP Settings from your host (usually provided)
- SMTP Server:
mail.yourdomain.com
or as given - Port:
587
(TLS) or465
(SSL) - Username: full email (e.g.,
noreply@yourdomain.com
) - Password: the password you created
- >Encryption: TLS/SSL
- SMTP Server:
-
-
(Optional) Enable SMTP Authentication
- This ensures your server requires username/password to send mail.