定制 znframework/package-email 二次开发

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

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

znframework/package-email

最新稳定版本:8.24.1

Composer 安装命令:

composer require znframework/package-email

包简介

ZN Framework Email Package

README 文档

README

ZN Framework Email Package

Follow the steps below for installation and use.

Installation

You only need to run the following code for the installation.

composer require znframework/package-email

Documentation

Click for documentation of your library.

Example Usage

Basic level usage is shown below.

<?php require 'vendor/autoload.php';

ZN\ZN::run();

# The default settings are in the ZN\Email\EmailDefaultConfiguration file. 
# You can make your settings in this file.
# The Config::set() method should be used if you need to configure settings externally.
Config::services('email', 
[
    'driver' => 'smtp',
    'smtp'   =>
    [
        'host'      => '',
        'user'      => '',
        'password'  => '',
        'port'      => 587,
        'keepAlive' => false,
        'timeout'   => 10,
        'encode'    => '',  # empty, tls, ssl
        'dsn'       => false,
        'auth'      => true
    ],
    'general' =>
    [
        'senderMail'    => '',                  # Default Sender E-mail Address.
        'senderName'    => '',                  # Default Sender Name.
        'priority'      => 3,                   # 1, 2, 3, 4, 5
        'charset'       => 'UTF-8',             # Charset Type
        'contentType'   => 'html',              # plain, html
        'multiPart'     => 'mixed',             # mixed, related, alternative
        'xMailer'       => 'ZN',
        'encoding'      => '8bit',              # 8bit, 7bit
        'mimeVersion'   => '1.0',               # MIME Version
        'mailPath'      => '/usr/sbin/sendmail' # Default Mail Path
    ]
]);

Email::from('from@example.com')
     ->to('to@example.com')
     ->send('This is Subject', 'This is message.');

Output::display(Email::error());

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-19