用第三方邮件代发接口
可以用这家的api
http://sendcloud.sohu.com/doc/email_v2/code/#php
只需修改代码 \includes\functions\functions_email.php
修改步骤:
在case 'PHP':后面下代码
send_mail($email_subject, $from_email_address, $from_email_name,$email_html,$to_email_address);
在文件结尾加
function send_mail($email_subject, $from_email_address, $from_email_name,$email_html,$to_email_address) {
$url = 'http://api.sendcloud.net/apiv2/mail/send';
//$url='http://sendcloud.sohu.com/webapi/mail.send.json';
$API_USER = '替换成你所申请的api用户参数值';
$API_KEY = '替换成你所申请的api秘钥参数值';
//$email_subject='测试主题';
//$from_email_name='测试邮箱@gmail.com';
$param = array(
'apiUser' => $API_USER,
'apiKey' => $API_KEY,
'from' => $from_email_address,
'fromName' => $from_email_name,
'to' => $to_email_address,
'subject' => $email_subject,
'html' => $email_html,
'respEmailId' => 'true'
);
$data = http_build_query($param);
$options = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => $data
));
$context = stream_context_create($options);
$result = file_get_contents($url, FILE_TEXT, $context);
return $result;
}
本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件至:admin@ptpc120.com 进行举报,并提供相关证据,工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。
请登录后评论~