定制 jumichica/jmail 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jumichica/jmail

Composer 安装命令:

composer require jumichica/jmail

包简介

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

README 文档

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 Jumichica\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 Jumichica\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 Jumichica\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');

// If you need to set a opened action when the people read the email then use:
$jmail->send('[EMAIL_TO]','Hello World!','My firts Email HTML','My first mail TEXT', "", "[URL_LINK_TO_YOUR_SCRIPT_PHP]");

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

统计信息

  • 总下载量: 206
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2022-05-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固