If you don’t already have a Gmail account, create one.
At the top of the page, select the Settings icon and then the Settings link.
On the Settings page, click the Forwarding and POP/IMAP tab.
In the POP Download section, select the "Enable POP for all mail" option.
Click the Save Changes button.
Log in to your Gmail account and go to your Inbox.
Configuration information for a Gmail SMTP server
Setting
Value
SMTP
Host name
smtp.gmail.com
Encryption
TLS
Authentication
TRUE
Port number
587
Username
username@gmail.com - For example: johndoe@gmail.com
Password
Gmail account password - For example: pa55word
Description
Before you can use PHP to send email, you need to connect to an SMTP server. If you have an Internet Service Provider (ISP) or a web hosting company, it will often provide access to an SMTP server. In addition, web-based email services such as Gmail typically provide access to an SMTP server.
During development, you may not have access to an SMTP server. In this case, you can set up a free Gmail account as described above and use the Gmail SMTP server to test your application.
During testing, make sure that you don’t abuse the SMTP server by sending unsolicited emails. Otherwise, access to the server may be terminated, and you may be reported to your ISP as a possible spammer.