wuzhicms 发送邮件

发送邮件

//邮件发送
                $config = get_cache('sendmail');
                $siteconfigs = get_cache('siteconfigs');
                $password = decode($config['password']);
                //load_function('sendmail');
                $t = date('YmdHis');
                $subject = '有新的订单';
                $message = $formdata['title']."电话:".$formdata['mobile'].date('Y-m-d H:i:s',SYS_TIME);
                $message .= "请尽快审批!";
                $mail = load_class('sendmail');
                $mail->setServer($config['smtp_server'], $config['smtp_user'], $password); //设置smtp服务器,普通连接方式
                $mail->setFrom($config['send_email']); //设置发件人
                $mail->setReceiver('sss@ss.com'); //设置收件人,多个收件人,调用多次
                $mail->setMail($subject, $message); //设置邮件主题、内容
                $mail->sendMail(); //发送

 

  1. //邮件发送
  2. $config = get_cache('sendmail');
  3. $siteconfigs = get_cache('siteconfigs');
  4. $password = decode($config['password']);
  5. //load_function('sendmail');
  6. $t = date('YmdHis');
  7. $subject = '有新的订单';
  8. $message = $formdata['title']."电话:".$formdata['mobile'].date('Y-m-d H:i:s',SYS_TIME);
  9. $message .= "请尽快审批!";
  10. $mail = load_class('sendmail');
  11. $mail->setServer($config['smtp_server'], $config['smtp_user'], $password); //设置smtp服务器,普通连接方式
  12. $mail->setFrom($config['send_email']); //设置发件人
  13. $mail->setReceiver('sss@ss.com'); //设置收件人,多个收件人,调用多次
  14. $mail->setMail($subject, $message); //设置邮件主题、内容
  15. $mail->sendMail(); //发送
posted @ 2016-05-23 10:41  赵宏伟  阅读(227)  评论(0编辑  收藏  举报