akbsit/helper-smtp

Helper for work with smtp.

1.0.0 2023-09-17 19:22 UTC

This package is auto-updated.

Last update: 2024-04-17 21:00:16 UTC


README

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.