Skip to content

Commit

Permalink
Manual sending e-mail also should use background worker.
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed May 2, 2024
1 parent 908b76e commit bf2c99f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lhc_web/lib/core/lhmailconv/lhmailconvvalidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ public static function setWebPHPIMAPTimeouts()
imap_timeout(IMAP_READTIMEOUT, 15);
}

public static function sendEmail($item, & $response, $user_id = 0) {
public static function sendEmail($item, & $response, $user_id = 0, $params = []) {
try {
$mailReply = new PHPMailer(true);
$mailReply->CharSet = "UTF-8";
Expand Down Expand Up @@ -888,7 +888,7 @@ public static function sendEmail($item, & $response, $user_id = 0) {
$response['send'] = $mailReply->Send();

if ($item->mailbox->create_a_copy == true) {
$response['copy'] = self::makeSendCopy($mailReply, $item->mailbox);
$response['copy'] = self::makeSendCopy($mailReply, $item->mailbox, $params);
}

} catch (Exception $e) {
Expand Down
2 changes: 1 addition & 1 deletion lhc_web/modules/lhmailconv/sendemail.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
if (empty($Errors)) {

$response = array();
erLhcoreClassMailconvValidator::sendEmail($item, $response, $currentUser->getUserID());
erLhcoreClassMailconvValidator::sendEmail($item, $response, $currentUser->getUserID(), ['background' => true]);

if ($response['send'] == true) {
$tpl->set('updated',true);
Expand Down

0 comments on commit bf2c99f

Please sign in to comment.