sy/mail 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sy/mail

Composer 安装命令:

composer require sy/mail

包简介

Simple mail library

README 文档

README

Simple mail library

Installation

Install the latest version with

composer require sy/mail

Basic Usage

Use php mail() function by default

<?php

use Sy\Mail;

$mail = new Mail('syone7@gmail.com', 'Hello world', 'This is a test mail!');
$mail->send();

Use a SMTP server

<?php

use Sy\Mail;

$mail = new Mail('syone7@gmail.com', 'Hello world', 'This is a test mail!');
$mail->setSmtp('smtp.gmail.com', 'example@gmail.com', 'password', 'tls', 587);
$mail->send();

Responsive Simple HTML Email Template

<?php

use Sy\Mail;
use Sy\Mail\Template\Html;

$html = new Html('This is a simple html email template!');

$mail = new Mail('syone7@gmail.com', 'Simple html template', $html);
$mail->send();
<?php

use Sy\Mail;
use Sy\Mail\Template\Html;

$html = new Html();
$html->addImage('https://picsum.photos/600/300', 'Image Alt');
$html->addParagraph('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.');
$html->addButton('Go to website now!', 'https://example.com');
$html->setFooterLink('Unsubscribe', 'https://example.com', "Don't like these emails?");
$html->setPoweredBy('HTML email', 'https://example.com', 'Powered by');

$mail = new Mail('syone7@gmail.com', 'Simple html template', $html);
$mail->send();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-10-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固