Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/Controller/OutboxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ public function createFromDraft(DraftsService $draftsService, int $id, int $send
* @param string $body
* @param string $editorBody
* @param bool $isHtml
* @param bool $failed
* @param array $to i. e. [['label' => 'Linus', 'email' => 'tent@stardewvalley.com'], ['label' => 'Pierre', 'email' => 'generalstore@stardewvalley.com']]
* @param array $cc
* @param array $bcc
Expand All @@ -198,7 +197,6 @@ public function update(
bool $isHtml,
bool $smimeSign,
bool $smimeEncrypt,
bool $failed = false,
array $to = [],
array $cc = [],
array $bcc = [],
Expand Down Expand Up @@ -231,6 +229,10 @@ public function update(
$message->setSmimeEncrypt($smimeEncrypt);
$message->setRequestMdn($requestMdn);

// Reset the status to make it retryable.
$message->setFailed(false);
$message->setStatus(LocalMessage::STATUS_RAW);

if (!empty($smimeCertificateId)) {
$smimeCertificate = $this->smimeService->findCertificate($smimeCertificateId, $effectiveUserId);
$message->setSmimeCertificateId($smimeCertificate->getId());
Expand Down
4 changes: 0 additions & 4 deletions tests/Unit/Controller/OutboxControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ public function testUpdate(): void {
$message->isHtml(),
$message->getSmimeSign(),
$message->getSmimeEncrypt(),
false,
$to,
$cc,
[],
Expand Down Expand Up @@ -533,7 +532,6 @@ public function testUpdateMessageNotFound(): void {
$message->isHtml(),
$message->getSmimeSign(),
$message->getSmimeEncrypt(),
false,
$to,
$cc,
[],
Expand Down Expand Up @@ -588,7 +586,6 @@ public function testUpdateDbException(): void {
$message->isHtml(),
$message->getSmimeSign(),
$message->getSmimeEncrypt(),
false,
$to,
$cc,
[],
Expand Down Expand Up @@ -688,7 +685,6 @@ public function testUpdateValidateCertificateId(): void {
$message->isHtml(),
$message->getSmimeSign(),
$message->getSmimeEncrypt(),
false,
$to,
$cc,
[],
Expand Down
Loading