-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from OrifInformatique:Fix_smtp_protocol
Fix: repair verification code sent by e-mail
- Loading branch information
Showing
2 changed files
with
8 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -348,18 +348,15 @@ public function generate_send_verification_code($form_email) { // generate code | |
'SMTPHost' => getenv('SMTP_HOST'), | ||
'SMTPUser' => getenv('SMTP_ID'), | ||
'SMTPPass' => getenv('SMTP_PASSWORD'), | ||
'SMTPPort' => getenv('SMTP_PORT'), | ||
]; | ||
'SMTPCrypto' => getenv('SMTP_CRYPTO'), | ||
]; | ||
|
||
$appTitle = lang('common_lang.app_title'); | ||
|
||
$email->initialize($emailConfig); | ||
|
||
// Sending code to user's orif mail | ||
$email->setFrom('[email protected]', 'ORIF: Vérification du mail'); // 2nd paramater hard coded since variable not interpreted in SetFrom | ||
$email->setTo($form_email); | ||
$email->setSubject('Code de vérification'); | ||
$email->setMessage('Voici votre code de vérification: '.$verification_code); | ||
//Sending code to user's orif | ||
$email->setFrom(getenv('SMTP_ID'), lang('common_lang.app_title')); | ||
$email->setSubject(lang('user_lang.mail_verification_code_subject')); | ||
$email->setMessage(lang('user_lang.mail_verification_code_text').$verification_code); | ||
$email->send(); | ||
|
||
// Set code's expiration timer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters