Napisałem aplikację w Symfony4.
Do wysyłania maili używam SwiftMailer.
Wrzuciłem ją na heroku.
Wszystko działa jak należy z wyjątkiem wysyłania maili.
Kiedy próbuję wysłać email ręcznie z konsoli tym poleceniem:
heroku run php bin/console swiftmailer:email:Send
Wyrzuca mi błędy:
Exception occurred while flushing email queue: Failed to authenticate on SMTP server with username "[email protected]" using 1 possible authenticat ors. Authenticator LOGIN returned Swift_TransportException: Expected response code 235 Please log in via your web browser and then try again. Learn more at https://support.google.com/mail/answer/78754 i65sm11848023qkh.49 - gsmtp " in /app/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:457
Moja konfiguracja w pliku swiftmailer.yaml:
swiftmailer:
transport: gmail
username: healthcard95
password: ********
host: localhost
port: 465
encryption: ssl
auth-mode: login
spool: { type: 'memory' }
stream_options:
ssl:
allow_self_signed: true
verify_peer: false
verify_peer_name: false
W ustawieniach konta google zezwoliłem na dostęp do mniej bezpiecznych aplikacji.
Jakie parametry mam zmienić żeby heroku zezwoliło mi na wysyłanie maili?