邮件发送 smtp

Installs: 52

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:project

v0.03 2018-01-30 09:06 UTC

This package is auto-updated.

Last update: 2024-10-29 04:47:31 UTC


README

smtp邮件 可用于阿里dm

$ composer require yonghua4413/smtp
//引入
use YYHemail\smtp;

$mailto='接受者邮箱';
$mailsubject="邮件标题";
$mailbody= '邮件内容';
$smtpserver     = "smtpdm.aliyun.com";
$smtpserverport = 80;#端口

$smtpusermail   = "发信地址";
$smtpuser       = "发信地址";
$smtppass       = "smtp密码";

$mailsubject    = "=?UTF-8?B?" . base64_encode($mailsubject) . "?=";
$mailtype       = "HTML";
$smtp           = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass);
$smtp->debug    = FALSE; 
$smtp->sendmail($mailto, $smtpusermail, $mailsubject, $mailbody, $mailtype);