////////////////////////////////////////////////////////////
// EmailClass 0.5
// class for sending mail
//
// Paul Schreiber
// [email protected]
// http://paulschr " /> 99精品国产高清自在线看超,欧美s00老人,久久AV喷吹AV高潮欧美

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

給多個地址發郵件的類

<?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  
//                    "[email protected]",         // sender's email  
//                    array("[email protected]", "[email protected]"), // To: recipients  
//                    "[email protected]"      // 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技術給多個地址發郵件的類,轉載需保留來源!

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

主站蜘蛛池模板: 男男高h浪荡受h | 琪琪电影午夜理论片YY6080 | 成年人免费观看的视频 | 亚洲精品无码成人AAA片 | 青青草伊人 | 美女脱了内裤张开腿让男人爽 | 国产精品嫩草影院 | 女王黄金vk | 被六个男人躁到一夜同性 | 日本在线高清不卡免费播放 | 日韩欧美一区二区三区在线视频 | 芳草地在线观看免费视频 | 国产成人精品综合久久久 | 亚洲AV久久无码精品热九九 | 国产自产视频在线观看香蕉 | 99在线国产视频 | 日韩午夜欧美精品一二三四区 | 偷拍精品视频一区二区三区 | 亚洲精品拍拍央视网出文 | 国产精品嫩草久久久久 | 国产女人视频免费观看 | 欧美牲交A欧美牲交VDO | 国产大片51精品免费观看 | 久久免费看少妇高潮A片特爽 | 花蝴蝶高清观看免费 | 亚洲qingse中文字幕久久 | 忘忧草下载 | 成人bt下载| 18av 在线| 亚洲精品中文字幕无码A片蜜桃 | 激情男女高潮射精AV免费 | 亚洲欧美日韩一级特黄在线 | 国产成+人+综合+亚洲不卡 | 花蝴蝶免费版高清版 | 99久久精品国产亚洲AV | 久久久久国产一级毛片高清片 | 插骚妇好爽好骚 | 成人精品视频在线观看 | 97干97吻 | 美女胸网站 | 美女的jj|