Mail für PHP.
Dokumentation von blar/mail auf Read-the-Docs
$mail = new Mail();
$mail->setFrom('[email protected]');
$mail->setTo('[email protected]');
$mail->getHeaders()->set('Subject', 'Hello World');
$mail->setBody('Hello World');
$transport = new SendmailTransport();
$transport->sendMail($mail);
$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);