////////////////////////////////////////////////////////////
// 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技術給多個地址發郵件的類,轉載需保留來源!

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

主站蜘蛛池模板: 风月宝鉴之淫乱英雄传 电影 | 嫩交18xxxx | 老师的蕾丝小内内湿透了 | 欧美色图一区二区三区 | 4484在线观看视频 | 日本wwwxx| 性满足久久久久久久久 | 亚洲一区二区三区乱码在线欧洲 | 在线观看成人免费 | 夜色88V精品国产亚洲AV | 扒开老师大腿猛进AAA片邪恶 | 美女爽到嗷嗷嗷叫 | 久久久久99精品成人片三人毛片 | 久久久国产精品免费A片蜜臀 | 伊人精品影院 | A级韩国乱理伦片在线观看 a级成人免费毛片完整版 | 久久亚洲精品成人综合 | 麻豆啊传媒app黄版破解免费 | 欧美特级午夜一区二区三区 | 在线看片韩国免费人成视频 | 富婆大保健嗷嗷叫普通话对白 | 国产精品一区二区激情 | 女生下面免费看 | 果冻传媒MV免费播放在线观看 | 强伦姧久久久久久久久久 | 秋霞伦理手机在线看片 | 国内精品一级毛片免费看 | 久久日本精品在线热 | 国产精品九九久久 | 国产AV国产精品国产三级在线L | 日韩AV爽爽爽久久久久久 | 一个人在线观看免费中文www | 国产 高清 无码 在线播放 | 91视频18 | 精品国产免费第一区二区 | 老熟风间由美AV在线一区二区 | 久久久精品免费免费直播 | 成人在线视频免费 | 97精品视频 | 中文字幕不卡免费高清视频 | 中文字幕亚洲欧美日韩2019 |