EC CUBE 4 メールが届かない場合のstmpパスの設定

EC CUBE4でサイト開設時に色々とごちゃごちゃとしてしまったのでメールが届かなくなりました。
会員登録メールですらちゃんと届かないと何も出来ないので設定を見直します。

環境:
さくらサーバースタンダードプラン
EC CUBE 4.0.0
PHP Version 7.2.10

早速インストールディレクトリ直下の .envファイルを見に行ってみると

###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=smtp://bistro@localhost:25?auth_mode=plain
###< symfony/swiftmailer-bundle ###

こんな部分があります。
あれ?

MAILER_URL=smtp://bistro@localhost:25?auth_mode=plain

ここの部分変じゃね・・・?となったのでSMTPパスが変な方向向いてるんじゃないかとログを確認。

    [2018-12-12 13:54:27] app.ERROR [N/A] [d0c8b81] [1] [Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener:onTerminate:64] - Exception occurred while flushing email queue: Failed to authenticate on SMTP server with username "bistro" using 1 possible authenticators....

のようなログが残されていました。
これは間違いない、ということで

MAILER_URL=smtp://info@bistro.site:password@localhost:587?auth_mode=plain

(「info@bistro.site」の部分は自分のメールアドレス、「password」の部分は自分で設定したパスワードですよ!)

に直したら届きました!!!
良かった良かった。

EC CUBE

Posted by bistro