手撸一个 PHP 很快啊
- 找个提供 SMTP 的邮件服务商,这里用的阿里云企业邮箱免费版
- 将 PHPMailer 放置同一目录,
https://github.com/PHPMailer/PHPMailer<?php
$text = $_REQUEST['text'];
$title = $_REQUEST['title'];
$addr = $_REQUEST['addr'];
date_default_timezone_set('Etc/UTC');
require 'PHPMailer-5.2.23/PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->CharSet = "UTF-8";
$mail->isSMTP();
$mail->SMTPDebug = 0;
$mail->Debugoutput = 'html';
//随便找个 SMTP 邮件服务商
$mail->Host = "
smtp.mxhichina.com";
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->Username = "account@domain.com";
$mail->Password = "password";
$mail->setFrom('account@domain.com', 'account');
$mail->addReplyTo('account@domain.com', 'account');
$mail->addAddress($addr, $addr);
$mail->Subject = $title;
$mail->Body = $text;
if (!$mail->send())
{
echo "邮件发送失败: " . $mail->ErrorInfo;
} else
{
echo "邮件发送成功。";
}
?>