helper-smtp, Packagist
Creating an Smtp class object by passing the connection settings to the constructor:
$oSmtpHelper = new SmtpHelper([
'maillogin' => 'noreply@falbar.ru',
'mailpass' => '*********',
'from' => 'Falbar',
'host' => 'ssl://smtp.yandex.ru',
'port' => 465
]);
Send Email:
$bStatus = $oSmtpHelper->send(
'akbsit@yandex.ru',
'Mail title',
'Mail text'
);
If successful, it returns – true in another case – false.