📄 sendmail.php
字号:
<?php
require './include/common.inc.php';
require_once PHPCMS_ROOT.'/include/form.class.php';
$mail = load('sendmail.class.php');
switch ($action)
{
case 'ajax':
if (empty($email) && !empty($contentid) )
{
$email = explode(',',$email);
if(!array_map('is_mail',$email))
{
echo '0';
}
}
else
{
$email = explode(',',$email);
if(!array_filter($email, 'is_email'))
{
echo '0';
}
else
{
$email = implode(',',$email);
$sql = "SELECT `title` , `url` FROM ".DB_PRE."content WHERE contentid = '{$contentid}' AND status=99";
$row = $db->get_one($sql);
if(empty($row)) echo '0';
$content = '<html><a href='.$row[url].' target="_blank">'.$row[title].'</a><br/></html>';
if( $mail->send($email, $row['title'], $content, $PHPCMS['mail_user']) ) echo '1';
}
}
break;
default:
if($dosubmit)
{
checkcode($checkcode,$M['ischeckcode']);
if(empty($mailto)) showmessage($LANG['input_addressee'],"goback");
if(empty($title)) showmessage($LANG['input_mail_subject'],"goback");
if(empty($content)) showmessage($LANG['input_mail_content'],"goback");
$content = stripslashes($content);
if( $mail->send($mailto, $title, $content, $PHPCMS['mail_user'])) showmessage('鍙戦
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -