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

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

給多個地址發郵件的類

[摘要]<?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 );  
        }  
}  


}  
?>  



主站蜘蛛池模板: 亚洲综合九九 | 日韩不卡一区二区 | 欧美特级一级片 | 亚洲精品福利在线观看 | 色久视频 | 日本午夜三级 | 日韩专区亚洲国产精品 | 色精品一区二区三区 | 色狠狠成人综合网 | 中文字幕在线欧美 | 添人人躁日日躁夜夜躁夜夜揉 | 欧美偷拍小视频 | 五月综合色| 四虎国产精品免费观看 | 亚欧在线精品免费观看一区 | 色久综合在线 | 午夜日韩久久影院 | 五月婷综合 | 日韩精品无码一区二区三区 | 青青青亚洲精品国产 | 日夜啪 | 亚洲aa| 午夜色视频在线观看 | 中文在线免费看视频 | 手机天堂网| 日日干夜夜操 | 日本不卡高清免费v日本 | 日日摸夜夜 | 午夜爱| 天天躁天天弄天天爱 | 四虎免费视频 | 四虎精品成人a在线观看 | 先锋资源国产 | 日本免费观看日本高清视频 | 亚洲欧美激情综合第一区 | 日本高清在线观看视频 | 永久看一二三四线 | 四虎一影院区永久精品 | 色男人综合| 日韩专区亚洲精品欧美专区 | 日韩在线视频观看 |