fractal512/plain-smtp-mailer 问题修复 & 功能扩展

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

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

fractal512/plain-smtp-mailer

Composer 安装命令:

composer require fractal512/plain-smtp-mailer

包简介

Laravel 5+ plain SMTP mailer package.

README 文档

README

Custom mail driver for Laravel 5+ working with SMTP server via a socket.

Installation

The Plain SMTP Mailer can be installed via Composer by requiring the fractal512/plain-smtp-mailer package:

composer require fractal512/plain-smtp-mailer

or add fractal512/plain-smtp-mailer to require section and set the minimum-stability to dev (required for Laravel 5) in your project's composer.json:

{
    "require": {
        "laravel/framework": "5.0.*",
        "fractal512/plain-smtp-mailer": "^1.0"
    },
    "minimum-stability": "dev"
}

then update your packages with composer update or install with composer install.

Registration in Laravel

No need in versions with auto discovery (Laravel 5.5+). Register the Plain SMTP Mailer Service Provider in the providers key in config/app.php.

    'providers' => [
        // ...
        'Fractal512\PlainSmtpMailer\PlainSmtpMailerServiceProvider',
    ]

for Laravel 5.1+

    'providers' => [
        // ...
        Fractal512\PlainSmtpMailer\PlainSmtpMailerServiceProvider::class,
    ]

Configuration

Publish the package mailer.php config file to apply your own settings.

$ php artisan vendor:publish --tag=mailerconfig

or run (Laravel 8+)

$ php artisan vendor:publish

then enter the number of the Fractal512\PlainSmtpMailer\PlainSmtpMailerServiceProvider service provider.

Options in config file refer to options for mail driver in the app .env file:

MAIL_DRIVER=PlainSmtpMailer
MAIL_DOMAIN=example.com
MAIL_HOST=smtp.example.com
MAIL_PORT=25
MAIL_USERNAME=noreply@example.com
MAIL_PASSWORD=12345678
MAIL_CLIENT="Desired mail client full name like: Outlook Express (v1.0)...|The Bat! (v1.0)...|Mozilla Thunderbird (v1.0)... etc."
MAIL_ENCRYPTION=null

Usage

You need configured SMTP server with account created on your hosting. You can use built in Laravel mail functionality with Plain SMTP Mailer, just enable PlainSmtpMailer driver in .env by setting:

MAIL_DRIVER=PlainSmtpMailer

and adding all the other needed options in MAIL section as shown in Configuration section above.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固