⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 send.class.php

📁 是一个基于PHP+Mysql架构的开源内容管理系统
💻 PHP
字号:
<?php
class send
{
	var $mail_datadir = '';
	var $error = '';
    var $mail = '';
    var $max_mail = '';
    var $maxnum = '';
	function send()
	{
        global $M;
		$this->mail_datadir = PHPCMS_ROOT.'data/mail/data/';
        $this->mail = load('sendmail.class.php');
        $this->maxnum = $M['maxnum'];
	}

    function send_one($email, $title, $content, $fromemail)
    {
        return $this->mail->send($email, stripslashes($title), stripslashes($content), $fromemail);
    }

    function send_many($num = '',$MultiEmail = array(), $title, $content, $fromemail)
	{
		$maxnum = !empty($maxnum) ? intval($maxnum) : 10;
		$MultiEmail = str_replace("\r", "", $MultiEmail);
		$MultiEmail = str_replace("\n", ",", $MultiEmail);
		$MultiEmail = explode(",", $MultiEmail);
		$toemail = array();
		foreach($MultiEmail AS $email)
		{
			if($email == '' || !is_email($email)) continue;
			else
			{
				$toemail[] = $email;
			}
		}
		$temp_mail = implode(',', $toemail);
        return $this->mail->send($temp_mail, stripslashes($title), stripslashes($content), $fromemail);
	}

    function send_file($file, $start)
	{
        $temp_content = $this->get_cache();
        $start = isset($start) ? intval($start) : 0;
		$maxnum = intval($temp_content['maxnum']);// max
		$sendmail = array();
        $temp_mail = $this->get_mail($file, $start, $maxnum);
        $temp_total = $start + $maxnum;
        if($temp_mail['totalnum'] > $start)
        {
		    if($this->mail->send($temp_mail['tempmail'], stripslashes($temp_content['title']), stripslashes($temp_content['content']), $temp_content['fromemail']))
            {
                $url = "?mod=mail&file=send&type=3&maillistfile=$file&dosubmit=1";
                $url .= '&start='.$temp_total;
                showmessage('浠

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -