Download the PHP package jacksunny/aliyunmailer without Composer
On this page you can find all versions of the php package jacksunny/aliyunmailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jacksunny/aliyunmailer
More information about jacksunny/aliyunmailer
Files in jacksunny/aliyunmailer
Package aliyunmailer
Short Description laravel framework mailer plugin which based on AliyunMail
License
Informations about the package aliyunmailer
aliyunmailer
laravel framework mailer plugin which based on AliyunMail
pre-condition
completed setting from user domain dns manage(like MX record),and,completed creating from user account(like [email protected]) under Aliyun Controller Panel
How to install and configurate package
-
install the laravel package composer require "jacksunny/aliyunmailer":"dev-master"
please check exist line "minimum-stability": "dev" in composer.json if failed
-
set default mailer to aliyunmail in file config/mail.php
'driver' => env('MAIL_DRIVER', 'aliyunmail'), 'aliyunmail' => [ 'region' => 'cn-hangzhou', 'key' => 'APPKEYAPPKEY', 'secret' => 'APPSECRETAPPSECRETAPPSECRET', ],
-
set default mailer to aliyunmail in file .env
MAIL_DRIVER=aliyunmail
- append new service provider file line in the section providers of file app.config after appended,it should looks like 'providers' => [ Illuminate\Auth\AuthServiceProvider::class, ...... Jacksunny\AliyunMailer\ExtendedMailServiceProvider::class, ],
-
add route to test if it works,run http://localhost/sendalimail after route defined below
Route::get("/sendalimail", function() { $result = Mail::raw('这里填写邮件的内容', function ($message) { // 发件人(你自己的邮箱和名称) $message->from('[email protected]', 'laravel'); // 收件人的邮箱地址 $message->to('[email protected]'); // 邮件主题 $message->subject('test at 20170608'); }); return $result; });
- please notify me if you got any problem or error on it,thank you!