PHPFrameworks comes with tools to send mails.
$mailService = new \AppZap\PHPFramework\Mail\MailService();
$message = \AppZap\PHPFramework\Mail\MailMessage::newInstance();
$message->addTo($recipient);
$message->setFrom($senderMail, $senderName);
$message->setSubject($subject);
$message->setBody($content);
$mailService->send($message);
We run swiftmailer under the hood to send mails. The MailMessage
class is simply extending the Swift_Message
class. Therefore you can use any options it has.
The MailService
is completely configurable throught settings.ini
options. See the options starting with mail.
in the Configuration chapter for details.