oliveris/sdk-mail 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

oliveris/sdk-mail

Composer 安装命令:

composer require oliveris/sdk-mail

包简介

Sends email and campaigns to a provider specified.

README 文档

README

PHP-SDK for multiple Mail services

Pupose of the SDK is to help with the delivery of mail and campaigns using multiple services.

Usage

Pull in the composer package by running the command below:

composer require oliveris/sdk-mail

Import the Mail namespace into the class (autoloading)

use Mail\Mail;

Examples

Sending an email

The following example demonstrates how you can send a basic email

$mail = Mail::getDriver('mailgun');
$mail->setKey('your_maligun_api_key');
$mail->setDomain('your_domain');
$mail->setTo('test@test.com');
$mail->setFrom('test-from@test.com');
$mail->setSubject('This is a test subject');
$mail->setBody('Lorem ipsum dolor sit amet, mollis hendrerit vix at. Altera meliore signiferumque vix an. Sonet delectus assentior eu sed, cu meliore ponderum quo. At quo idque virtute. Impedit mentitum est ei, assum abhorreant eam cu.');
$mail->send();

Sending a batch email

The following example demonstrates how you can send batch emails.

$mail = Mail::getDriver('mailgun');
$mail->setKey('your_maligun_api_key');
$mail->setDomain('your_domain');
$mail->setTo([
    'test@test.com',
    'test2@test.com'
]);
$mail->setFrom('test-from@test.com');
$mail->setSubject('This is a test subject');
$mail->setBody('Lorem ipsum dolor sit amet, mollis hendrerit vix at. Altera meliore signiferumque vix an. Sonet delectus assentior eu sed, cu meliore ponderum quo. At quo idque virtute. Impedit mentitum est ei, assum abhorreant eam cu.');
$mail->send();

For further examples look in the tests/index.php.

Built With

  • PHP 7

Versioning

We use Semantic Versioning 1.0.0, for example v1.0.0.

Authors

  • Sam Oliveri - Software Engineer

License

Text is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固