定制 xp-framework/mail 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

xp-framework/mail

最新稳定版本:v9.0.3

Composer 安装命令:

composer require xp-framework/mail

包简介

Mail for XP

关键字:

README 文档

README

Build status on GitHub XP Framework Module BSD Licence Requires PHP 7.0+ Supports PHP 8.0+ Latest Stable Version

E-Mail APIs, POP3, IMAP, MailDir, SMTP support.

Creating an email

use peer\mail\{Message, InternetAddress};

$msg= new Message();
$msg->setFrom(new InternetAddress('friebe@example.com', 'Timm Friebe'));
$msg->addRecipient(TO, new InternetAddress('foo@bar.baz', 'Foo Bar'));
$msg->addRecipient(CC, new InternetAddress('timm@foo.bar', 'Timm Friebe'));
$msg->setHeader('X-Binford', '6100 (more power)');
$msg->setSubject('Hello world');
$msg->setBody('Testmail');

Sending email

use peer\mail\transport\{MailTransport, TransportException};

$smtp= new MailTransport();
try {
  $smtp->connect();
  $smtp->send($msg);
} catch (TransportException $e) {
  $e->printStackTrace();
}

$smtp->close();

Using an SMTP server

use peer\mail\transport\{SmtpConnection, TransportException};

$smtp= new SmtpConnection('esmtp://user:pass@mail.example.com:25/?auth=login');
try {
  $smtp->connect();
  $smtp->send($msg);
} catch (TransportException $e) {
  $e->printStackTrace();
}

$smtp->close();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-01-10