Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.06 KB

readme.md

File metadata and controls

34 lines (23 loc) · 1.06 KB

Build Status Coverage Status Dependency Status

blar/mail

Mail für PHP.

Dokumentation von blar/mail auf Read-the-Docs

Mail erstellen

$mail = new Mail();
$mail->setFrom('[email protected]');
$mail->setTo('[email protected]');
$mail->getHeaders()->set('Subject', 'Hello World');
$mail->setBody('Hello World');

Mail versenden

$transport = new SendmailTransport();
$transport->sendMail($mail);

Mail über externen SMTP-Server versenden

$transport = new CurlTransport('smtp.example.com');

// Zugangsdaten für den SMTP-Server
$credentials = new BasicCredentials();
$credentials->setUserName('foo');
$credentials->setPassword('bar');
$transport->setCredentials($credentials);

$transport->sendMail($mail);