I want to use Google's SMTP relay service as a SMTP server in PHP.
The IP address is whitelisted for the SMTP relay service, and I am using the SwiftMailer as a PHP library to send emails.
I configured the SMTP service to use TLS encryption, and set the following parameters for the SwiftMailer:
transport: smtp
host: smtp-relay.gmail.com
port: 587
encryption: tls
auth_mode: login
I was able to send emails via telnet, but when I try to send emails with SwiftMailer with the above configuration, I receive the following error:
[CLOSED] IMAP connection broken (server response) (errflg=2)
How can I configure the SwiftMailer to use Google SMTP relay service as its SMTP server? Is it ever possible?