シナリオ:連絡フォームが正しく記入されて送信されると、特定のメールアドレスに送信メールを送信する必要があります。 Sendmail DNSの問題(hereが表示されます)と戦った後、私は戦術を変更し、GmailのSMTPサーバーを使用してメールを送信することに決めました。しかし、スプールをフラッシュする時に、私は次のエラーを取得する:Swiftmailer/gmailが2つの認証者を使用してユーザ名で認証に失敗しました
15:04:31 ERROR [console] Error thrown while running command "swiftmailer:spool:send --env=prod". Message: "Failed to authenticate on SMTP server with username "[email protected]" using 2 possible authenticators" ["error" => Swift_TransportException { …},"command" => "swiftmailer:spool:send --env=prod","message" => "Failed to authenticate on SMTP server with username "[email protected]" using 2 possible authenticators"] [] 15:04:31 ERROR [console] Command "swiftmailer:spool:send --env=prod" exited with code "1" ["command" => "swiftmailer:spool:send --env=prod","code" => 1] []
マイconfig.yml
:
# Swiftmailer Configuration
swiftmailer:
transport: '%mailer_transport%'
host: '%mailer_host%'
username: '%mailer_user%'
password: '%mailer_password%'
port: '%mailer_port%'
encryption: '%mailer_encryption%'
spool:
type: file
path: '%kernel.cache_dir%/swiftmailer/spool'
そしてparameters.yml
:
mailer_transport: smtp
mailer_host: 'smtp.gmail.com'
mailer_user: '[email protected]'
mailer_password: 'somesecurepassword'
mailer_port: 587
mailer_encryption: 'tls'
は、私は、TLSを設定するために何かをする必要がありますか私の終わりに、正しいポートを開くの外に?それとも他に何かできますか?