swiftamailer works. how to send to soap in dektrium \ user

    1 answer 1

    It is necessary to configure the input data for mailer'a in the modules config section to the user module config for mailer :

    ... 'user' => [ 'class' => 'dektrium\user\Module', 'mailer' => [ 'sender' => 'no-reply@myhost.com', // or ['no-reply@myhost.com' => 'Sender name'] 'welcomeSubject' => 'Welcome subject', 'confirmationSubject' => 'Confirmation subject', 'reconfirmationSubject' => 'Email change subject', 'recoverySubject' => 'Recovery subject', ], ], ... 

    Plus, you need to configure the mailer component itself in the components config section.

     'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', // send all mails to a file by default. You have to set // 'useFileTransport' to false and configure a transport // for the mailer to send real emails. 'useFileTransport' => false, 'transport' => [ 'class' => 'Swift_SmtpTransport', 'host' => '...', 'username' => '...', 'password' => '...', 'port' => '...', 'encryption' => '...', ], ], 

    More details can be found here.

    • Although the link can find the answer to the question, it is better to point out the most important thing here, and give the link as a source. If the page to which the link leads will be changed, the response link may become invalid. - From the queue of checks - VenZell
    • Thanks, accepted :) - 1Pauletto