PHP mail using Gmail

Gmail’s SMTP-server requires a very specific configuration.

From Gmail help:

Outgoing Mail (SMTP) Server (requires TLS)
 - smtp.gmail.com
 - Use Authentication: Yes
 - Use STARTTLS: Yes (some clients call this SSL)
 - Port: 465 or 587
Account Name:   your full email address (including @gmail.com)
Email Address:  your email address ([email protected])
Password:     your Gmail password 

You can probably set these settings up in Pear::Mail or PHPMailer. Check out their documentation for more details.

Leave a Comment