If you are using Gmail as an SMTP Server, most chances are it won't work on the first try. And it would definitely won't work if you have enabled 2-factor authentication.
So here are the 3 steps you would need to complete before be able to send emails using Gmail SMTP Server.
This is simple, Just go to Gmail Settings and click the Enable IMAP option.
Now, go to the following link to Allow Less Secure Apps to Access your Gmail Account. https://myaccount.google.com/lesssecureapps
If you are using 2-Step Verification, the above step won't work. Instead you would need to visit the following link and Unlock Other Apps: https://accounts.google.com/DisplayUnlockCaptcha
Hooraay!! SMTP Form should work fine now.
Still not working? Comment below or ask the Gmail Community