Files
hdk-core/src/Events/EmailWillSent.php

74 lines
1.4 KiB
PHP

<?php
/**
* EmailWillSent.php@HDK-Core
*
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
* Powered by PhpStorm
* Created on 2023/1/16
*/
namespace Singularity\HDK\Core\Events;
use Singularity\HDK\Core\Service\EmailService;
use Symfony\Component\Mime\Email;
/**
* Singularity\HDK\Core\Events\EmailWillSent@HDK-Core
*
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
* Powered by PhpStorm
* Created on 2023/1/16
*
* @link ../../docs/Email.md
*/
class EmailWillSent
{
public function __construct(
/**
* @var string|string[] $target
*/
public string|array $target,
/**
* @var non-empty-string $subject
*/
public string $subject,
/**
* @var non-empty-string $content
*/
public string $content,
/**
* 抄送
*
* @var string[] $cc
*/
public array $cc = [],
/**
* 密送
*
* @var string[] $bcc
*/
public array $bcc = [],
/**
* @var 'text'|'html' $type
*/
public string $type = 'text',
/**
* @var int
* @see Email::priority()
*/
public int $priority = Email::PRIORITY_NORMAL,
/**
* @var EmailService|null
*/
public ?EmailService $sender = null,
) {
}
}