shippinno/email 问题修复 & 功能扩展

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

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

shippinno/email

Composer 安装命令:

composer require shippinno/email

包简介

README 文档

README

Scrutinizer Code Quality Code Coverage Build Status

Installation

$ composer require shippinno/email

Usage

Use a SendEmail to send an Email. It reattempts to send if $maxReattempts attribute is set.

use Shippinno\Email\SwiftMailer\SwiftMailerSendEmail;
use Tanigami\ValueObjects\Web\Email;
use Swift_Mailer;

$sendEmail = new SwiftMailerSendEmail(new Swift_Mailer(...));
$sendEmail->execute(
    new Email(...),
    3 // max reattempts
);

Dealing with non RFC email address

Swift Mailer

Swift Mailer rejects Non RFC compliant email addresses by default.

You can set a custom email validator and Mime grammer (for Swift Mailer 5.x compatibility) allowing non RFC email address (e.g. email.@example.com) by calling allow_non_rfc_email_address(); function.

use function Shippinno\Email\SwiftMailer\register_swift_non_rfc_email_validator;

allow_non_rfc_email_address();
(new Swift_Message)->setTo('email.@example.com'); // => OK

EmailAddress object

Tanigami\ValueObjects\Web\EmailAddress requires its value to be RFC compliant by default. You can have it soft validate by setting the second attribute of the constructor to true.

new EmailAddress('email..@example.com') // => InvalidArgumentException
new EmailAddress('email..@example.com', true); // => OK

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-11-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固