Closed graemelawgct closed 1 year ago
SMTP and IMAP are two different things. IMAP is a fetching protocol and SMTP is a sending one. Gmail heavily restricts SMTP with limits and additional configuration to prevent abuse, thus not making it easy to use SMTP service. I recommend that you use Postmark or one of the listed SMTP services for sending emails. They are not that expensive if not totally free.
I am pretty sure you need to use Gmail API to send outgoing mail programmatically (eg not relay it from another mailbox). I'd suggest you ask google support how to obtain the right credentials or look online.
I'm trying to configure a mailbox, connecting via IMAP to a GSuite account.
I've tried various permutations (using account password, turning on 2fa & using app-specific password) but nothing works.
I'm able to successfully retrieve a list of folders, but Check Connection fails, as does Fetch Emails. I'm also having no luck configuring SMTP! Having said this, some mails do come through! I've run tests around 20 times this morning, and on the most recent (without me changing anything) it retrieved 3 mails out of around 65.
IMAP Error log
Error: imap_open(): Couldn't open stream {imap.gmail.com:993/imap/ssl}. Retrying PLAIN authentication after [AUTHENTICATIONFAILED] Invalid credentials (Failure); Retrying PLAIN authentication after [AUTHENTICATIONFAILED] Invalid credentials (Failure); Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Invalid credentials (Failure); File: /home/helpdeskgreencro/public_html/overrides/webklex/laravel-imap/src/IMAP/Client.php (230)