承接 jalle19/sanemail 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

jalle19/sanemail

Composer 安装命令:

composer require jalle19/sanemail

包简介

Zend Mail wrapper for those who want to preserve their sanity

README 文档

README

Zend Mail wrapper for those who want to preserve their sanity without having to resort to using ZF1. It provides an easy solution for sending e-mail without having to write 50 lines of code, and in contrast to doing it according to the ZF2 documentation, this way actually works.

Features

  • Does the proper magic to make sure Zend\Mail actually uses the encoding you specify
  • Always sets a plain-text version before the HTML version so that your e-mails, you know, actually display correctly
  • Properly sets the correct Content-Type for e-mails containing both a plain-text and an HTML version so that, as sane people expect, the HTML version is displayed unless the user requests the plain-text version

Installation

Install via Composer

Usage

$mail = new SaneMail\Mail();
$mail->addFrom('from@example.com', 'Disgruntled programmer');
$mail->addTo('to@example.com');
$mail->addCc('cc@example.com');
$mail->addBcc('bcc@example.com');
$mail->addReplyTo('replyto@example.com');
$mail->setSubject('This is a working e-mail');

$html = '<html><head><title></title></head><body><h1>This is HTML</h1><p>This is a paragraph</p></body></html>';
$text = "This is plain-text\n\nThis is a paragraph";

$mail->setBodyText($text);
$mail->setBodyHtml($html);

try {
	$mail->send();
}
catch(SaneMail\Exception $e) {
	// Zend\Mail\Exception\RuntimeException available from $e->getPrevious()
}

License

This library is licensed under the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-07-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固