anonym-php/anonym-mail

AnonymFramework Mail Component

dev-master / 1.2.x-dev 2015-09-15 01:25 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:35:26 UTC


README

This is mail component for AnonymFramework. fast, stable and have multiple driver

Which drivers are supported?

PHPMailer, SwiftMailer

How Can I Create A Instance

use Anonym\Components\Mail\Mail;

$mail = new Mail();

How can i start a driver?

$configs = []; // host, username, password, port ws
$driver = $mail->driver('phpmailer', $configs); // or swift

How Can i add a driver?

$mail->add('drivername', 'Driver/Class/Name');

How can i use a driver?

$driver->subject('subject name'); // add a subject
$driver->from('your@address.com', 'your name');
$driver->to('href@adress.com', 'href name');
$driver->returnPath('return@adress.com', 'return name');
$driver->bcc('bcc@adress.com', 'bcc name'); // add a bcc

$driver->attach('filename.ext');