2
0
forked from Wavyzz/dolibarr

Use a dedicated sendcontext when sending email for password reset

This commit is contained in:
Laurent Destailleur
2023-05-23 01:35:30 +02:00
parent 1ff1c8d48c
commit 4a1153dc49
3 changed files with 16 additions and 13 deletions

View File

@@ -164,7 +164,7 @@ class CMailFile
* @param string $css Css option
* @param string $trackid Tracking string (contains type and id of related element)
* @param string $moreinheader More in header. $moreinheader must contains the "\r\n" (TODO not supported for other MAIL_SEND_MODE different than 'mail' and 'smtps' for the moment)
* @param string $sendcontext 'standard', 'emailing', ... (used to define which sending mode and parameters to use)
* @param string $sendcontext 'standard', 'emailing', 'ticket', 'password', ... (used to define which sending mode and parameters to use)
* @param string $replyto Reply-to email (will be set to same value than From by default if not provided)
* @param string $upload_dir_tmp Temporary directory (used to convert images embedded as img src=data:image)
*/
@@ -187,7 +187,7 @@ class CMailFile
$this->sendcontext = $sendcontext;
// Define this->sendmode ('mail', 'smtps', 'siwftmailer', ...) according to $sendcontext ('standard', 'emailing', 'ticket')
// Define this->sendmode ('mail', 'smtps', 'swiftmailer', ...) according to $sendcontext ('standard', 'emailing', 'ticket', 'password')
$this->sendmode = '';
if (!empty($this->sendcontext)) {
$smtpContextKey = strtoupper($this->sendcontext);