承接 schema31/php-ci-mailer 相关项目开发

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

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

schema31/php-ci-mailer

Composer 安装命令:

composer require schema31/php-ci-mailer

包简介

README 文档

README

======

Packagist

Mailer for CodeIgniter.

Install

You can install the library using composer:

$ composer require schema31/php-ci-mailer

How to use

Configurations

Here the list of all configuration attributes supported:

Preference Default Value Options Description
useragent CodeIgniter None The “user agent”.
protocol mail mail sendmail
mailpath /usr/sbin/sendmail None The server path to Sendmail.
smtp_host No Default None SMTP Server Address.
smtp_user No Default None SMTP Username.
smtp_pass No Default None SMTP Password.
smtp_port 25 None SMTP Port.
smtp_timeout 5 None SMTP Timeout (in seconds).
smtp_keepalive FALSE TRUE FALSE
smtp_crypto No Default tls ssl
wordwrap TRUE TRUE FALSE
wrapchars 76 None Character count to wrap at.
mailtype text text html
charset $config['charset'] Character set (utf-8, iso-8859-1, etc.).
validate FALSE TRUE FALSE
priority 3 1 2
crlf \n “\r\n” “\n”
newline \n “\r\n” “\n”
bcc_batch_mode FALSE TRUE FALSE
bcc_batch_size 200 None Number of emails in each BCC batch.
dsn FALSE TRUE FALSE
from_email No Default None “From” e-mail address.
from_name No Default None “From” display name.
prefix_subject No Default None If you want to set a prefix for your subject

Internal configuration

You can use an array of configurations:

$config = [];
$config['protocol'] = 'smtp';// mail, sendmail, smtp
$config['smtp_host'] = 'smtp_host';// SMTP Server Address.
$config['smtp_user'] = 'smtp_user';// SMTP Username.
$config['smtp_pass'] = 'smtp_pass';// SMTP Password.
$config['smtp_port'] = '25';// SMTP Port.
$config['mailtype'] = 'html';// text or html
$config['smtp_timeout'] = '30';// SMTP Timeout (in seconds).
$config['from_email'] = 'noreply@example.it';
$config['from_name'] = 'CI MAILER';
$config['prefix_subject'] = 'Mailer - ';

$mailer = new \Schema31\CiMailer\Mailer($config);

Configuration file

You can use the file named "cemail.php" in application/config folder and the library loads it automatically:

$mailer = new \Schema31\CiMailer\Mailer();

Adding recipients

You can add a single or multiple recipients (like the "to", "cc", "bcc" recipient) with:

$mailer = new \Schema31\CiMailer\Mailer();

$mailer->setSingleTo("foo01@bar.com"); //Single "to" recipient
$mailer->setSingleCc("foo02@bar.com"); //Single "cc" recipient
$mailer->setSingleBcc("foo03@bar.com"); //Single "bcc" recipient

Or

$mailer = new \Schema31\CiMailer\Mailer();

$mailer->setMultipleTo(["foo01@bar.com", "foo0101@bar.com"]); //Multiple "to" recipient: "foo01@bar.com" and "foo0101@bar.com"
$mailer->setMultipleCc(["foo02@bar.com", "foo0202@bar.com"]); //Multiple "cc" recipient: "foo02@bar.com" and "foo0202@bar.com"
$mailer->setMultipleBcc(["foo03@bar.com", "foo0303@bar.com"]); //Multiple "bcc" recipient: "foo03@bar.com" and "foo0303@bar.com"

Or

$mailer = new \Schema31\CiMailer\Mailer();

$mailer->setSingleTo("foo01@bar.com,foo0101@bar.com"); //Multiple "to" recipient: "foo01@bar.com" and "foo0101@bar.com" comma separated
$mailer->setSingleCc("foo02@bar.com,foo0202@bar.com"); //Multiple "cc" recipient: "foo02@bar.com" and "foo0202@bar.com" comma separated
$mailer->setSingleBcc("foo03@bar.com,foo0303@bar.com"); //Multiple "bcc" recipient: "foo03@bar.com" and "foo0303@bar.com" comma separated

Printing debbuger message

If you want to print debug message after the send of the email:

$mailer = new \Schema31\CiMailer\Mailer();

//...

echo $mailer->printDebugger();

Sending an email

$mailer = new \Schema31\CiMailer\Mailer();

//Method chaining is allowed
$mailer
->setSingleTo("foo01@bar.com")
->setSubject("Email di prova #" . uniqid())
->setMessage("La email di testo")
->send(); //returns true if the email is sent, false otherwise.

schema31/php-ci-mailer 适用场景与选型建议

schema31/php-ci-mailer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 09 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 schema31/php-ci-mailer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 schema31/php-ci-mailer 我们能提供哪些服务?
定制开发 / 二次开发

基于 schema31/php-ci-mailer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2020-09-04