六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

給多個地址發郵件的類

[摘要]<?php //////////////////////////////////////////////////////////// // EmailClass 0.5 // class for sending mail // // Paul Schreiber //...
<?php  

////////////////////////////////////////////////////////////  
//   EmailClass 0.5  
//   class for sending mail  
//  
//   Paul Schreiber  
//   [email protected]  
//   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 );  
        }  
}  


}  
?>  



主站蜘蛛池模板: 欧美一区二区激情三区 | 欧美性猛交一区二区三区 | 亚洲国产成a人v在线观看 | 综合久久久久综合体桃花网 | 欧美网站www | 中文字幕国产专区 | 日本福利视频一区 | 五月天婷婷在线视频国产在线 | 日韩城人视频 | 天天操夜夜添 | 四虎毛片| 日韩永久在线观看免费视频 | 欧美亚洲欧美日韩中文二区 | 欧美在线香蕉在线现视频 | 五月天伊人网 | 亚洲剧场午夜在线观看 | 日日夜夜操天天干 | 日韩美香港a一级毛片 | 网络色综合久久 | 在线免费观看韩国a视频 | 日韩3p| 日本国产一区二区三区 | 亚洲综合第一 | 青青青青手机在线视频观看国产 | 青娱乐91视频 | 日韩乱码视频 | 欧美一级淫片免费播放口 | 日本一区二区三区在线 视频观看免费 | 亚洲午夜精品一级在线 | 无码中文字幕日韩专区 | 人人天天夜夜 | 亚洲第一天堂无码专区 | 综合热久久| 依人在线 | 一道本久久 | 亚洲第一页综合 | 伊人狠狠| 亚洲大片免费 | 欧美一级看片免费观看视频在线 | 四虎影视免费永久在线观看 | 一级美女黄色片 |