定制 osumionline/plugin-email 二次开发

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

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

osumionline/plugin-email

最新稳定版本:3.1.0

Composer 安装命令:

composer require osumionline/plugin-email

包简介

Plugin OEmail para Osumi Framework

README 文档

README

Osumi Framework Plugins: OEmail

Este plugin añade la clase OEmail al framework con la que se pueden enviar emails usando la función nativa mail de PHP. Por defecto se envían emails en formato HTML.

$email = new OEmail();

// Remitente
$email->setFrom('user@example.com');
$email->setFromName('User name');
// Añadir destinatarios uno a uno
$email->addRecipient('user@gmail.com');
$email->addRecipient('user@hotmail.com');
// Añadir destinatarios mediante un array
$email->setRecipients(['user@gmail.com', 'user@hotmail.com']);
// Asunto
$email->setSubject('Asunto');
// Contenido del email (con HTML)
$email->setMessage('Contenido del email<br>con HTML');
// Contenido del email (texto plano)
$email->setIsHtml(false);
$email->setMessage('Contenido del email con texto plano');
// Adjuntos (uno a uno)
$email->addAttachment('/path/to/file.pdf');
// Adjuntos mediante un array
$email->setAttachments(['/path/to/file.pdf', '/path/to/another_file.pdf']);

// Enviar email
$email->send();

// Tras realizar el envío se puede comprobar la lista de usuarios a los que se les ha enviado y aquellos que han dado error
$usuarios_correctos = $email->getResultOk();
$usuarios_error = $email->getResultError();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-02