Email content

Support two types ofr text and html

Text

Example

$mimeBean = new \EasySwoole\Smtp\Message\Text();
$mimeBean->setSubject('Hello Word!');
$mimeBean->setBody('<h1>Hello Word</h1>');

Effect

Html

$mimeBean = new \EasySwoole\Smtp\Message\Html();
$mimeBean->setSubject('Hello Word!');
$mimeBean->setBody('<h1>Hello Word</h1>');

Effect

Attachments

$mimeBean = new \EasySwoole\Smtp\Message\Text();
//$mimeBean = new \EasySwoole\Smtp\Message\Html();

...

// Create attachment
$createAttachment = Attach::create('./test.txt');

// Get attachment
$mimeBean->addAttachment($createAttachment);

...