[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] ListExecute: email sending with custom from address
"Domeshow Emmanuel \(@Domeshow\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a8df15343a09_3891eeffc55476@gitlab-sidekiq-low-urgency-cpu-bound-v2-7f4b5767d6-kmsbc.mail> |
Domeshow Emmanuel pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki Commits: 2e9200e3 by Domeshow Emmanuel at 2026-08-25T22:40:37+03:00 [FIX] ListExecute: email sending with custom from address --- * [FIX] ListExecute: email sending with custom from address --- * [FIX] ListExecute - email sending with custom from address See merge request tikiwiki/tiki!11028 (cherry picked from commit 813a0385d631938d0c94c465bf716f5374dc6423) f6138a4e [FIX] ListExecute - email sending with custom from address Co-authored-by: Domeshow Emmanuel <[email protected]> See merge request tikiwiki/tiki!11063 - - - - - 2 changed files: - lib/core/Search/Action/EmailAction.php - lib/test/Core/Search/EmailActionTest.php Changes: ===================================== lib/core/Search/Action/EmailAction.php ===================================== @@ -80,7 +80,7 @@ class Search_Action_EmailAction implements Search_Action_Action if ($from = $data->from->raw()) { $fromEmail = $this->dereference($from); - $fromName = $this->dereferenceName($from); + $fromName = $this->dereferenceName($from) ?: ''; if (! empty($fromEmail[0])) { $mail->setFrom($fromEmail[0], $fromName); $mail->setSender($fromEmail[0], $fromName); ===================================== lib/test/Core/Search/EmailActionTest.php ===================================== @@ -157,6 +157,22 @@ class SearchActionEmailActionTest extends TikiTestCase ]))); } + public function testExecuteAllowsLiteralFromEmailAddressWithoutDisplayName() + { + $this->mail->expects($this->once()) + ->method('setFrom') + ->with('[email protected]', ''); + $this->mail->expects($this->once()) + ->method('setSender') + ->with('[email protected]', ''); + $this->expectSend(['[email protected]'], true); + + $this->assertTrue($this->action->execute($this->createInput([ + 'from' => '[email protected]', + 'to' => ['[email protected]'], + ]))); + } + private function createInput(array $overrides = []): JitFilter { return new JitFilter(array_merge([ View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/2e9200e38892ed72ced425ffb67c677f5adbd02a -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/2e9200e38892ed72ced425ffb67c677f5adbd02a You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help _______________________________________________ TikiWiki-cvs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs