From 1c4fbc9fdf49b27ead8af2fe6bdc5c145d59cd0c Mon Sep 17 00:00:00 2001 From: Hank Grabowski Date: Wed, 22 Mar 2023 18:25:32 -0400 Subject: [PATCH] Fix other calls to Mail::send to provide ID --- mod/message.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/message.php b/mod/message.php index 1e8c012ee..99fb6b3b4 100644 --- a/mod/message.php +++ b/mod/message.php @@ -69,12 +69,13 @@ function message_post(App $a) return; } + $sender_id = DI::userSession()->getLocalUserId(); $replyto = !empty($_REQUEST['replyto']) ? trim($_REQUEST['replyto']) : ''; $subject = !empty($_REQUEST['subject']) ? trim($_REQUEST['subject']) : ''; $body = !empty($_REQUEST['body']) ? Strings::escapeHtml(trim($_REQUEST['body'])) : ''; $recipient = !empty($_REQUEST['recipient']) ? intval($_REQUEST['recipient']) : 0; - $ret = Mail::send($recipient, $body, $subject, $replyto); + $ret = Mail::send($sender_id, $recipient, $body, $subject, $replyto); $norecip = false; switch ($ret) {