dilongfa/smtpmailer

A simple, secure SMTP Client library written in PHP, only supports TLS, SSL

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/dilongfa/smtpmailer

dev-master 2019-08-26 13:50 UTC

This package is not auto-updated.

Last update: 2025-12-24 18:52:18 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

Click here

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.