Okay, this code \'was\' working perfectly and then I started playing around with it in order to let others connect to their e-mails and as you do ran into a few open stream
Please use the below code to connect successfully,
$hostname = "{imap.gmail.com:993/imap/ssl/novalidate-cert}"; $mailbox = imap_open($hostname, 'admin@artisancodesmith.com', 'PASSWORD'); if ($mailbox) { // do work.... }