Mails sent just get stuck in queue
You need to use port 587 with TLS.
- Gmail SMTP port (TLS): 587
- Gmail SMTP port (SSL): 465
Source What Are the Gmail SMTP Settings?
I'm getting an error message that my app is not secure
Someone just tried to sign in to your Google Account firstname.lastname@example.org from an app that doesn't meet modern security standards.
You need to change a setting on your Gmail account.
Login to Gmail
Go to "My account"
Select "Sign-in & security"
Scroll to the bottom of the page
Set "Allow less secure apps" to "ON"
Try to send your emails again.
Allowing less secure apps to access your account
Google may block sign-in attempts from some apps or devices that do
not use modern security standards. Since these apps and devices are
easier to break into, blocking them helps keep your account safe.
Some examples of apps that do not support the latest security
- The Mail app on your iPhone or iPad with iOS 6 or below
- The Mail app on your Windows phone preceding the 8.1 release
- Some Desktop mail clients like Microsoft Outlook and Mozilla Thunderbird
Change account access for less secure apps
To help keep Google Apps users' accounts secure, we may block less
secure apps from accessing Google Apps accounts. As a Google Apps
user, you will see a "Password incorrect" error when trying to sign
in. If this is the case, you have two options:
Option 1: Upgrade to a more secure app that uses the most up to date security measures. All Google products, like Gmail, use the latest
Option 2: Change your settings to allow less secure apps to access your account. We don't recommend this option because it might make it
easier for someone to break into your account. If you want to allow
access anyway, follow these steps:
- Go to the "Less secure apps" section in My Account.
- Next to "Access for less secure apps," select Turn on. (Note to Google Apps users: This setting is hidden if your administrator has
locked less secure app account access.)
Source Allowing less secure apps to access your account