Browsers cannot make direct TCP/SMTP connections
Fill in your SMTP settings below to generate ready-to-run test scripts for Python, Node.js, curl, and PHP.
Port 465 → TLS | Port 587 → STARTTLS
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
HOST = 'smtp.example.com'
PORT = 587
USERNAME = 'your@email.com'
PASSWORD = 'your_password'
msg = MIMEMultipart()
msg['Subject'] = 'Test Email from SMTP Tester'
msg['From'] = 'from@example.com'
msg['To'] = 'to@example.com'
msg.attach(MIMEText('''Hello!
This is a test email sent via the SMTP Tester tool.
If you received this, your SMTP configuration is working correctly.''', 'plain'))
try:
with smtplib.SMTP(HOST, PORT) as smtp:
smtp.ehlo()
smtp.starttls()
smtp.login(USERNAME, PASSWORD)
smtp.send_message(msg)
print("Email sent successfully!")
except Exception as e:
print(f"Error: {e}")MX records configured for your domain
Verify MX records exist and point to valid mail servers
SMTP port is open (not blocked by firewall)
Common ports: 25, 465, 587, 2525
Authentication credentials are correct
Username / password or API key is valid
TLS/SSL configuration matches server requirements
Use TLS on port 465, STARTTLS on port 587
SPF record configured
v=spf1 include:_spf.google.com ~all
DKIM setup complete
DKIM public key published in DNS TXT record
DMARC policy in place
v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com
| Provider | SMTP Host | Ports | Encryption | Notes | Use |
|---|---|---|---|---|---|
| Gmail | smtp.gmail.com | 587465 | TLS/STARTTLS | Requires App Password | |
| Outlook / Office 365 | smtp.office365.com | 587 | STARTTLS | Use your email credentials | |
| Yahoo | smtp.mail.yahoo.com | 465 | TLS | Requires App Password | |
| SendGrid | smtp.sendgrid.net | 587465 | TLS/STARTTLS | API key as password | |
| Mailgun | smtp.mailgun.org | 587465 | TLS/STARTTLS | Domain-specific credentials | |
| AWS SES | email-smtp.us-east-1.amazonaws.com | 587465 | TLS/STARTTLS | IAM SMTP credentials | |
| Postmark | smtp.postmarkapp.com | 587465 | TLS/STARTTLS | Server API token as password | |
| Brevo (Sendinblue) | smtp-relay.brevo.com | 587465 | TLS/STARTTLS | SMTP key as password |
To check if your domain can receive email, verify its MX records are configured correctly. MX (Mail Exchange) records tell other mail servers where to deliver email for your domain.
Expected MX record format:
yourdomain.com. MX 10 mail.yourdomain.com. yourdomain.com. MX 20 mail2.yourdomain.com.
Lower priority number = higher preference. The mail server with priority 10 will be tried first.
SPF Record
TXT record
v=spf1 include:_spf.google.com ~allDKIM Record
TXT record with public key
selector._domainkey.yourdomain.comDMARC Record
_dmarc.yourdomain.com TXT
v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com