Ejemplo n.º 1
0
<?php

use CoreTyson\Mailer\Email;
use CoreTyson\Mailer\EmailMessage;
use CoreTyson\Mailer\Mailer;
$email = new Email();
$email->addRecipient('intelligide', '*****@*****.**')->setFrom('CoreTyson', '*****@*****.**')->setSubject('Mail Test')->addBc('*****@*****.**')->addBcc('*****@*****.**');
$plainTextMsg = new EmailMessage();
$plainTextMsg->setContent('Hello world')->setContentType('text/plain');
$attachment = new \CoreTyson\Mailer\Attachment("public/favicon.ico");
$email->addAttachment($attachment);
$email->addMessage($plainTextMsg);
Mailer::getSingleton()->send($email);