Skip to content

Commit

Permalink
Fix: SMTP protocol fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovsiankina committed Jun 14, 2024
1 parent 0acdfde commit 52b64ef
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions orif/user/Controllers/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,19 +348,17 @@ 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);
//Sending code to user's orif
$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);
$email->send();
$email->send(false);

// Set code's expiration timer
$_SESSION['timer_start'] = time();
Expand Down

0 comments on commit 52b64ef

Please sign in to comment.