定制 iturri/mail-sdk 二次开发

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

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

iturri/mail-sdk

最新稳定版本:1.0.14

Composer 安装命令:

composer require iturri/mail-sdk

包简介

Iturri mail gateway SDK for PHP projects

README 文档

README

This is a SDK for PHP projects that provides a friendly and easy interface to integrate your application with the IturriMail mailing gateway API.

This library provides a wrapper for the available API objects and a client to perform the requests.

Installation

$ composer require iturri/mail-sdk

Usage

The basic usage of the library is:


// importing the libraries
use IturriMail\EmailSender\Attach\Attach,
IturriMail\EmailSender\Email\EmailAddress,
IturriMail\EmailSender\EmailSender,
IturriMail\EmailSender\Templates,
IturriMail\IturriMail;
// creating a new IturriMail client instance
$iturriMail = IturriMail::factory();

// configuring the client
$iturriMail->setSender(new EmailAddress('ghiancorx@gmail.com', 'GhianCo Zapata'))
->setSubject('Asunto')
->setPathTemplate(app()::$root . '/templates/vb/concluido.html')
->setTemplate('DOCUMENT_BODY')
#Way 1
->setReceiver(new EmailAddress('ghiancorx@gmail.com', 'GhianCo 1'))
#Way 2
->setReceiver([['name'=> 'GhianCo 2','email'=>'ghiancorx@gmail.com']])
->setCC([['name'=> 'GhianCo 3','email'=>'ghiancorx@gmail.com']]);

$emailSender = new EmailSender();
// ... configuring the transaction object
$anyData = new stdClass;
$anyData->ot = 'OT Num 1';
$anyData->bl = 'Bl';
$anyData->cliente = 'Cliente';
$anyData->regimen = 'Regimen';
$emailSender->setBinding($anyData);

$emailSender->setAttach(new Attach('server/archivos/9328e4cfa53b9596f1e055ba31952399.png', 'Filename', "https://localhost/project"));
// performing the transaction
$response = $iturriMail->doSend($emailSender);

// check if the mail is sending
$response->isSuccess();

API and Developers Documentation

Soon

Tests

$ composer install --dev
$ ./vendor/bin/phpunit

License

This library is licensed under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-29