dilongfa / smtpmailer
A simple, secure SMTP Client library written in PHP, only supports TLS, SSL
dev-master
2019-08-26 13:50 UTC
Requires
- php: >=7.1
This package is not auto-updated.
Last update: 2024-10-02 12:44:49 UTC
README
A simple, lightweight and secure SMTP Client library written in PHP, only supports TLS, SSL
Install
Via Composer
$ composer require dilongfa/smtpmailer
Usage
<?php $mail = new SMTPMailer\Mailer('smtp.example.com', 587, 'tls'); $mail->setAuth('username@example.com', 'password'); $mail->setFrom('sender@example.com', 'Sender Name'); $mail->setTo('recipient@example.com', 'Recipient Name'); $mail->setSubject('Subject...'); $mail->setBody('Body...'); if ($mail->send()) { echo "Sent successfully"; } else { echo "Sent failed"; }
Examples
Security
If you discover any security related issues, please email dilongfa@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.