织梦dedecms提交留言表单信息自动发送到邮箱

COS、CDN
代码部分 找到 $query = "INSERT INTO `{$diy->table}` (`id`, `ifcheck` $addvar)  VALUES (NULL, 0 $addvalue); "; 在下方添加代码 $mailtitle = "提交表单通知"; $mailbody = "姓名:{$name}\r\n邮箱:{$email}\r\n内容:{$content}"; $headers = $cfg_adminemail; $mailtype = 'TXT'; require_once(DEDEINC.'/mail.class.php'); $smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); $smtp->debug = false; $smtp->sendmail($cfg_smtp_usermail,$cfg_webname ,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);

 

COS、CDN
热门