IMAP is a mailbox protocol. It does not (natively) support sending mail, only accessing it. In order to send mail you must use SMTP. Its possible that there is an IMAP extension for sending mail, and its possible that Google Mail supports that extension, but I doubt it. Hence, if you want to send an … Read more
Create a custom app in you Gmail security settings. Log-in into Gmail with your account Navigate to https://security.google.com/settings/security/apppasswords In ‘select app’ choose ‘custom’, give it an arbitrary name and press generate It will give you 16 chars token. Use the token as password in combination with your full Gmail account and two factor authentication will … Read more
You might want to start by isolating this problem to determine whether it’s truly a network problem; or whether it’s specific to PHP mailer or your code. On your server, from a command prompt, try using telnet to connect to smtp.gmail.com on port 587, like so: telnet smtp.gmail.com 587 You should see a response from … Read more
Get to your Gmail account’s security settings and set permissions for “Less secure apps” to Enabled. Worked for me.
Method 1 (Preferred) – Using hMailServer After installation, you need the following configuration to properly send mail from wampserver: 1) When you first open hMailServer Administrator, you need to add a new domain. 2) Click on the “Add Domain …” button at the Welcome page. 3) Under the domain text field, enter your computer’s IP, … Read more
I know this is an older issue, but I recently had the same problem and was having issues resolving it, despite attempting the DisplayUnlockCaptcha fix. This is how I got it alive. Head over to Account Security Settings (https://www.google.com/settings/security/lesssecureapps) and enable “Access for less secure apps”, this allows you to use the google smtp for … Read more