Mail - SamuelPouzet/auth GitHub Wiki
My module uses PHPMailer, since laminas mailer has been sadly abandonned An example of the config:
'mailer' => [
'default' => [
'options' => [
'protocol' => 'smtp',
'user' => '[email protected]',
'password' => 'password',
'host' => 'smtp.gmail.com',
'port' => 587,
'smtp_auth' => true,
'debug' => SMTP::DEBUG_SERVER,
'secure' => PHPMailer::ENCRYPTION_STARTTLS,
'options' => [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
]
]
],
],
],
We'll use two templates that we'll put in module/Application/view/mail activation.phtml (for the activation mail) reinitialisation.phtml (for the forgotten password email) both can use the variable Userinterface $user to add information.