Gmail has SMTP server at smtp.gmail.com which you can use to send email in your website application. However, although you have complete configuration on your web, you may get below error:
Expected response code 250 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 n8sm18107231yhn.10 - gsmtp"
Here is some steps which help you solve error code 535:
- Sign in to your Gmail account. Go to https://www.google.com/settings/security/lesssecureapps and click Enable
- Then go to https://accounts.google.com/DisplayUnlockCaptcha and click Continue
Now you can use Gmail SMTP to send email from your web normally.