|
|
|
@ -47,7 +47,7 @@ class Sendmail extends CI_Controller
|
|
|
|
|
public function send_mail(){
|
|
|
|
|
@set_time_limit(0);
|
|
|
|
|
$result=$this->InfoSMS_model->un_send_mail(1,0);
|
|
|
|
|
if (empty($result))
|
|
|
|
|
if (empty($result))
|
|
|
|
|
{
|
|
|
|
|
echo 'null';
|
|
|
|
|
die();
|
|
|
|
@ -57,14 +57,14 @@ class Sendmail extends CI_Controller
|
|
|
|
|
$config['smtp_host'] = 'hwsmtp.exmail.qq.com';//ssl://smtp.sendgrid.net';
|
|
|
|
|
$config['smtp_port'] = 25;
|
|
|
|
|
$config['smtp_user'] = 'noreply02@chinahighlights.net';//'zm198311@yahoo.com.cn';
|
|
|
|
|
$config['smtp_pass'] = 'eHgb2Z8G\HbR';//cits@123';
|
|
|
|
|
$config['smtp_pass'] = 'Ed4G9ctugbnm7bqa';//cits@123';
|
|
|
|
|
$config['smtp_timeout'] = 3600;
|
|
|
|
|
$config['mailtype'] = 'html';
|
|
|
|
|
$config['wordwrap'] = TRUE;
|
|
|
|
|
$config['crlf'] = "\r\n";
|
|
|
|
|
$config['newline'] = "\r\n";
|
|
|
|
|
|
|
|
|
|
foreach ($result as $key => $m)
|
|
|
|
|
foreach ($result as $key => $m)
|
|
|
|
|
{
|
|
|
|
|
$this->email->initialize($config);
|
|
|
|
|
$order_condition=false;
|
|
|
|
@ -76,7 +76,7 @@ class Sendmail extends CI_Controller
|
|
|
|
|
$this->email->subject($m->M_Title);
|
|
|
|
|
($m->M_Web!='chtcdn' && $m->M_Web!='paypal msg') && $m->M_Body = str_replace(array("\r\n", "\r", "\n"), "<br>", $m->M_Body);
|
|
|
|
|
$this->email->message($m->M_Body);
|
|
|
|
|
if (!$this->email->send())
|
|
|
|
|
if (!$this->email->send())
|
|
|
|
|
{
|
|
|
|
|
//发送失败,则记录日志,并发送一封邮件给管理员
|
|
|
|
|
$error_msg=$this->email->print_debugger();
|
|
|
|
@ -205,7 +205,7 @@ class Sendmail extends CI_Controller
|
|
|
|
|
echo "邮件错误信息: " . $mail->ErrorInfo;
|
|
|
|
|
} else {
|
|
|
|
|
echo " 邮件发送成功!<br />";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//发送邮件
|
|
|
|
@ -213,15 +213,15 @@ class Sendmail extends CI_Controller
|
|
|
|
|
$tomail = $tomail.'@citsguilin.com';
|
|
|
|
|
$subject='点赞邮件模板';
|
|
|
|
|
$mail_sn=time();
|
|
|
|
|
$mailbody='<div style="overflow:hidden">
|
|
|
|
|
<a style="height:auto;text-decoration: none;" href="http://saas.chtcdn.com/index.php?app=public&mod=Zan&act=comment&mailid='.$mail_sn.'">
|
|
|
|
|
<img src="http://saas.chtcdn.com/data/upload/Comment.png" />
|
|
|
|
|
</a>
|
|
|
|
|
<a style="height:auto;text-decoration: none;" href="http://saas.chtcdn.com/index.php?app=public&mod=Zan&act=zan&mailid='.$mail_sn.'" >
|
|
|
|
|
<img src="http://saas.chtcdn.com/data/upload/like.png" />
|
|
|
|
|
</a>
|
|
|
|
|
<br/>
|
|
|
|
|
<img style="float:left;clear:both;" src="http://saas.chtcdn.com/index.php?app=public&mod=Zan&act=index&mailid='.$mail_sn.'"/>
|
|
|
|
|
$mailbody='<div style="overflow:hidden">
|
|
|
|
|
<a style="height:auto;text-decoration: none;" href="http://saas.chtcdn.com/index.php?app=public&mod=Zan&act=comment&mailid='.$mail_sn.'">
|
|
|
|
|
<img src="http://saas.chtcdn.com/data/upload/Comment.png" />
|
|
|
|
|
</a>
|
|
|
|
|
<a style="height:auto;text-decoration: none;" href="http://saas.chtcdn.com/index.php?app=public&mod=Zan&act=zan&mailid='.$mail_sn.'" >
|
|
|
|
|
<img src="http://saas.chtcdn.com/data/upload/like.png" />
|
|
|
|
|
</a>
|
|
|
|
|
<br/>
|
|
|
|
|
<img style="float:left;clear:both;" src="http://saas.chtcdn.com/index.php?app=public&mod=Zan&act=index&mailid='.$mail_sn.'"/>
|
|
|
|
|
</div>';
|
|
|
|
|
$this->load->library('Phpmailer_lib');
|
|
|
|
|
$mail = new PHPMailer();
|
|
|
|
|