trk/processwire-php-mailer
最新稳定版本:v1.4.3
Composer 安装命令:
composer require trk/processwire-php-mailer
包简介
This module extends WireMail base class, integrating the PHPMailer mailing library into ProcessWire.
README 文档
README
This module extends WireMail base class, integrating the PHPMailer mailing library into ProcessWire.The module using PHPMailer. You can see an example usage below.
You can set your configs from module settings or you can directly call $mail = wire("modules")->get("WireMailPHPMailer"); $mail = $mail->mailer(); function for new PHPMailer() instance.
Using Directly PHPMailer library
/** @var WireMailPHPMailer $mail */ $mail = wire("modules")->get("WireMailPHPMailer"); // load module without module configs /** @var PHPMailer $mail */ $mail = $mail->getInstance(false);
$mail = wire("modules")->get("WireMailPHPMailer"); $mail = $mail->getInstance(); $mail->addAddress("email@domain.ltd", "Someone"); $mail->isHTML(true); $mail->Subject = "WireMailPHPMailer"; $html = "<h1>WireMailPHPMailer</h1>"; $text = "WireMailPHPMailer"; $mail->Body = $html; $mail->AltBody = $text; $mail->send();
Using Like classic WireMail method
$mail = wire("modules")->get("WireMailPHPMailer"); $mail->from("from@domain.ltd") ->fromName("A From Name") ->to('email@domain.ltd') ->subject('A Message Subject') ->body('A Message Body') ->bodyHtml("<h1>A HTML Message Body</h1>") ->send();
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-17