systemico/jmail

Micro library to send email notifications using different platforms like Mailgun, MailJet and others.

Installs: 1 482

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/systemico/jmail

1.5.3 2022-03-04 17:21 UTC

This package is auto-updated.

Last update: 2025-10-05 01:31:07 UTC


README

Micro library to send email notifications using different platforms like Mailgun, MailJet and others.

Example with Mailgun

require_once (__DIR__."/../vendor/autoload.php");

use Systemico\JMail;

$jmail= new JMail();
$jmail->credentials('[PRIVATE_API_KEY]', '[DOMAIN]', '[SENDER]',JMail::$MAILGUN,'[NAME_SENDER]');
$jmail->send('[EMAIL_TO]','Hello World!','My firts Email HTML','My first mail TEXT');

Example with MailJet

require_once (__DIR__."/../vendor/autoload.php");

use Systemico\JMail;

$jmail= new JMail();
// Mensaje con MailJet
$jmail->credentials(array('[API_KEY]','[SECRET_API_KEY]'), '[DOMAIN]', '[SENDER]',JMail::$MAILJET,'[NAME_SENDER]');
$jmail->send('[EMAIL_TO]','Hello World!','My firts Email HTML','My first mail TEXT');

Example with PHPMailer

require_once (__DIR__."/../vendor/autoload.php");

use Systemico\JMail;

$jmail= new JMail();
// Mensaje con PHPMailer
$jmail->credentials_mailer('[EMAIL_FROM]', '[EMAIL_FROM_PASSWORD]', '[NAME]', 'NAME_TO', 'SMTP SERVER');
$jmail->send('[EMAIL_TO]','Hello World!','My firts Email HTML','My first mail TEXT');

DEBUG activation

The last parameter con credentials method lect activate the debug, if you want. Let me show you a example:

// DEBUG False
$jmail->credentials_mailer('[EMAIL_FROM]', '[EMAIL_FROM_PASSWORD]', '[NAME]', 'NAME_TO', 'SMTP SERVER');

// DEBUG true
$jmail->credentials_mailer('[EMAIL_FROM]', '[EMAIL_FROM_PASSWORD]', '[NAME]', 'NAME_TO', 'SMTP SERVER', true);

Contributors

Edwin Ariza me@edwinariza.com