分类分类
更新时间:2015-07-09 08:54作者:fang
现在很多服务器商都会由于禁用SMTP,防止用户滥发邮件,让系统更稳定。 这里如果禁用,采用如下修改方法即可解决问题,
在ecshop种修改lib_base.php
将此函数原有的内容注释掉,用下面的方法进行替换.即可绕过服务器使用80发送邮件.
function send_mail($name, $email, $subject, $content, $type = 0, $notification=false){
include_once(ROOT_PATH . 'includes/mandrill/Mandrill.php');
try {
$mandrill = new Mandrill($GLOBALS['_CFG']['smtp_pass']);
$message = array(
'text' => '',
'html' => $content,
'subject' =>$subject,
'from_email' => $GLOBALS['_CFG']['smtp_mail'],
'from_name' =>$shop_name,
'to' => array(
array(
'email' => $email,
'name' => $name,
'type' => 'to'
)//www.zuimoban.com
),
'headers' => array('Reply-To' => 'calvin@moke8.com')
);
//$async = false;
//$ip_pool = 'Main Pool';
//$send_at = '2015-05-05 16:56:01';
$result = $mandrill->messages->send($message);
return true;
//print_r($result);
} catch(Mandrill_Error $e) {
// Mandrill errors are thrown as exceptions
echo 'A mandrill error occurred: ' . get_class($e) . ' - ' . $e->getMessage();
// A mandrill error occurred: Mandrill_Unknown_Subaccount - No subaccount exists with the id 'customer-123'
throw $e;
}
相关
纸片马里奥(Paperboat)角色扮演107.85 MBv1.0.32026-11-29
下载cyime输入法实用工具74.58 MBv1.15.1072026-11-29
下载武道仙宗官方版角色扮演456.19 Mv1.0.02026-11-29
下载mmrl模块app实用工具7.15 Mv342962026-11-29
下载零希沃特手机版角色扮演511.54 Mv1.4.22026-11-29
下载Bannerlator手游辅助574.84 MBv3.2.12026-11-29
下载巅峰激战(魔幻格斗游戏)动作射击797.1 MBv1.0.92026-11-29
下载我的火车防御策略游戏181.87 Mv1.1.52026-11-29
下载三国棋逢对手角色扮演1.7Gv1.2.5.0002.1125.11432026-11-29
下载图纸没问题手机版休闲益智78.41 Mv1.0.182026-11-29
下载蛊界永生角色扮演407.01 Mv0.4.162026-11-28
下载百炼仙途角色扮演528.9 Mv10002026-11-28
下载










