ttek/tk-mail
Composer 安装命令:
composer require ttek/tk-mail
包简介
A mail lib using PHPMailer for the tk libs
README 文档
README
Project: tk-mail
Web: https://github.com/tropotek/tk-mail/
Authors: Michael Mifsud http://www.tropotek.com/
A mail lib for the Tk lib. Uses PHPMailer for the email driver.
Contents
Installation
Available on Packagist (ttek/tk-mail) and installable via Composer.
composer require ttek/tk-mail
Or add the following to your composer.json file:
"ttek/tk-mail": "~3.0"
Introduction
Basic Example:
$message = new \Tk\Mail\Message(); $message->addTo('info@tropotek.com'); $message->setFrom('godar@tropotek.com.au'); $message->setSubject('This is a test email'); $message->setBody(\App\Config::createMailTemplate('This is some message text')); $message->send();
Available Config Params:
/* Default config options */ $cfg = array(); /* * Options mail, smtp, sendmail, qmail */ $cfg['mail.driver'] = 'mail'; /* * SMTP settings */ /** * SMTP hosts. * Either a single hostname or multiple semicolon-delimited hostnames. * You can also specify a different port * for each host by using this format: [hostname:port] * (e.g. "smtp1.example.com:25;smtp2.example.com"). * You can also specify encryption type, for example: * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). * Hosts will be tried in order. * @var string */ $cfg['mail.smtp.host'] = 'localhost'; // The default SMTP server port. $cfg['mail.smtp.port'] = 25; $cfg['mail.smtp.username'] = ''; $cfg['mail.smtp.password'] = ''; // What kind of encryption to use on the SMTP connection. Options: '', 'ssl' or 'tls' $cfg['mail.smtp.secure'] = ''; // Whether to use SMTP authentication. Uses the Username and Password properties. $cfg['mail.smtp.enableAuth'] = true; // Whether to keep SMTP connection open after each message. If this is set to true // then to close the connection requires an explicit call to smtpClose(). $cfg['mail.smtp.enableKeepAlive'] = ''; // Checks if the send command was called from this site $cfg['mail.checkReferer'] = true; // Add valid domain names as valid referers if needed $cfg['mail.validReferers'] = ''; /* * Other misc options * Generally from the site config */ // Set this if you want all email to go to this address during debug //$cfg['system.debug.email'] = 'debug@'.$_SERVER['HTTP_HOST']; // \Tk\Request Used to set the X-Sender-IP, X-Referer headers //$cfg['request'] = ''; // \Tk\Session Used to set the X-SiteReferer header //$cfg['session'] = ''; // If true then all outgoing messages are sent to the `system.debug.email` address //$cfg['debug'] = false; // If set X-Application will be set to this //$cfg['system.name'] = ''; //$cfg['system.version'] = ''; // Change this to suite your message body encoding //$cfg['mail.encoding'] = 'UTF-8';
ttek/tk-mail 适用场景与选型建议
ttek/tk-mail 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 998 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 08 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「table」 「tropotek」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ttek/tk-mail 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ttek/tk-mail 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ttek/tk-mail 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Plug-ins for DataTables
A component that allows creating responsive HTML tables or lists from data object
Adjacency List’ed Closure Table database design pattern implementation for Laravel. Includes restore of tree
A simple package to create tables in Discord messages.
A bootstrap based UI lib for the Tk-lib framework
Provides a Data Grid tables for your Symfony project.
统计信息
- 总下载量: 998
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-08