Simplify enum MessagePriority

This commit is contained in:
the-djmaze 2024-02-26 21:52:18 +01:00
parent 851c1b6472
commit 02c6d30a7e
2 changed files with 5 additions and 5 deletions

View file

@ -18,12 +18,12 @@ namespace MailSo\Mime\Enumerations;
*/
enum MessagePriority: int
{
case LOWEST = 5;
case NORMAL = 3;
case HIGHEST = 1;
case Lowest = 5;
case Normal = 3;
case Highest = 1;
public function toMIME() : string
{
return $this->value . ' (' . \ucfirst(\strtolower($this->name)) . ')';
return $this->value . ' (' . $this->name . ')';
}
}

View file

@ -903,7 +903,7 @@ trait Messages
}
if (!empty($this->GetActionParam('markAsImportant', 0))) {
$oMessage->SetPriority(\MailSo\Mime\Enumerations\MessagePriority::HIGHEST);
$oMessage->SetPriority(\MailSo\Mime\Enumerations\MessagePriority::Highest);
}
$oMessage->SetSubject($this->GetActionParam('subject', ''));