How can you send mail using IMAP?

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

Sending email fails when two factor authentication is on for Gmail

Create a custom app in you Gmail security settings. Log-in into Gmail with your account Navigate to 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

phpmailer and gmail SMTP ERROR: Failed to connect to server: Network is unreachable (101) SMTP connect() failed

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 on port 587, like so: telnet 587 You should see a response from … Read more

(WAMP/XAMP) send Mail using SMTP localhost [closed]

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

Getting error while sending email through Gmail SMTP – “Please log in via your web browser and then try again. 534-5.7.14” [closed]

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 ( and enable “Access for less secure apps”, this allows you to use the google smtp for … Read more