////////////////////////////////////////////////////////////
// EmailClass 0.5
// class for sending mail
//
// Paul Schreiber
// php@paulschreiber.com
// http://paulschr " /> 久久是热这里只有精品,草民电影网午夜伦理电影网,国产精亚洲视频综合区

天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

給多個地址發(fā)郵件的類

<?php  

////////////////////////////////////////////////////////////  
//   EmailClass 0.5  
//   class for sending mail  
//  
//   Paul Schreiber  
//   php@paulschreiber.com  
//   http://paulschreiber.com/  
//  
//   parameters  
//   ----------  
//   - subject, message, senderName, senderEmail and toList are required  
//   - ccList, bccList and replyTo are optional  
//   - toList, ccList and bccList can be strings or arrays of strings  
//     (those strings should be valid email addresses  
//  
//   example  
//   -------  
//   $m = new email ( "hello there",            // subject  
//                    "how are you?",           // message body  
//                    "paul",                   // sender's name  
//                    "foo@foobar.com",         // sender's email  
//                    array("paul@foobar.com", "foo@bar.com"), // To: recipients  
//                    "paul@whereever.com"      // Cc: recipient  
//                   );  
//  
//       print "mail sent, result was" . $m->send();  
//  
//  
//  

if ( ! defined( 'MAIL_CLASS_DEFINED' ) ) {  
        define('MAIL_CLASS_DEFINED', 1 );  

class email {  

        // the constructor!  
        function email ( $subject, $message, $senderName, $senderEmail, $toList, $ccList=0, $bccList=0, $replyTo=0) {  
                $this->sender = $senderName . " <$senderEmail>";  
                $this->replyTo = $replyTo;  
                $this->subject = $subject;  
                $this->message = $message;  

                // set the To: recipient(s)  
                if ( is_array($toList) ) {  
                        $this->to = join( $toList, "," );  
                } else {  
                        $this->to = $toList;  
                }  

                // set the Cc: recipient(s)  
                if ( is_array($ccList) && sizeof($ccList) ) {  
                        $this->cc = join( $ccList, "," );  
                } elseif ( $ccList ) {  
                        $this->cc = $ccList;  
                }  

                // set the Bcc: recipient(s)  
                if ( is_array($bccList) && sizeof($bccList) ) {  
                        $this->bcc = join( $bccList, "," );  
                } elseif ( $bccList ) {  
                        $this->bcc = $bccList;  
                }  

        }  

        // send the message; this is actually just a wrapper for   
        // php's mail() function; heck, it's php's mail function done right :-)  
        // you could override this method to:  
        // (a) use sendmail directly  
        // (b) do SMTP with sockets  
        function send () {  
                // create the headers needed by php's mail() function  

                // sender  
                $this->headers = "From: " . $this->sender . "/n";  

                // reply-to address  
                if ( $this->replyTo ) {  
                        $this->headers .= "Reply-To: " . $this->replyTo . "/n";  
                }  

                // Cc: recipient(s)  
                if ( $this->cc ) {  
                        $this->headers .= "Cc: " . $this->cc . "/n";  
                }  

                // Bcc: recipient(s)  
                if ( $this->bcc ) {  
                        $this->headers .= "Bcc: " . $this->bcc . "/n";  
                }  

                return mail ( $this->to, $this->subject, $this->message, $this->headers );  
        }  
}  


}  
?>  

php技術(shù)給多個地址發(fā)郵件的類,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 草比比过程图 | 日韩中文字幕欧美在线视频 | 大地影院免费观看视频 | 十八禁肉动漫无修在线播放 | 国产人人为我我为人人澡 | 任你躁精品一区二区三区 | 99亚洲精品色情无码久久 | 999精品国产人妻无码系列 | 亚洲精品中文字幕一二三四区 | 欧美2019高清hd巨大 | 视频成人永久免费视频 | 国产精品私人玩物在线观看 | S货SAO死你BL大点声叫BL | 色一欲一性一乱一区二区三区 | 纯肉小黄文高H | 好紧小嫩嫩水的10p 好紧好湿太硬了我太爽了小说 | 暖暖 视频 在线 观看 高清 | 一一本之道高清手机在线观看 | av女优快播| 国产亚洲精品久久久久久无码网站 | 暖暖视频 免费 高清 日本8 | 日韩一区二区天海翼 | 娇妻玩4P被三个男人伺候电影 | aaaaaa级特色特黄的毛片 | 乳色吐息未增删樱花ED在线观看 | 午夜婷婷精品午夜无码A片影院 | japanese幼儿videos | 男人插曲女人下生免费大全 | 俄罗斯6一12呦女精品 | 视频成人永久免费看 | 一级做a爰片久久毛片潮喷动漫 | 8x华人免费视频 | 妈妈的职业3完整版在线播放 | 99久久精品国产高清一区二区 | 亚洲国产中文字幕新在线 | 草莓湿漉漉是好事还是恶性 | 奶头被客人吸得又红又肿 | HEYZO无码中文字幕人妻 | 无码人妻丰满熟妇啪啪网不卡 | 视频一区国产 | 亚洲国产女人aaa毛片在线 |