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

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

主站蜘蛛池模板: 亚洲欧美一级久久精品 | 免费在线观看国产 | 日韩精品亚洲专区在线电影不卡 | 国产免费久久精品国产传媒 | 苍井空小公主qvod | 伊人亚洲综合青草青草久热 | 最近的2019中文字幕国语HD | 你是淫荡的我的女王 | 青柠视频在线观看高清HD | 旧里番6080在线观看 | 亚洲福利精品电影在线观看 | 欧美日韩免费播放一区二区 | 国产第一页浮力影院 | 亚洲熟妇无码乱子AV电影 | 小雪奶水涨翁工帮吸的推荐语录 | 我的年轻漂亮继坶三级 | 久久国产成人午夜AV影院无码 | 国产精品嫩草影院一区二区三区 | 一品道门在线视频高清完整版 | 国产亚洲精品久久精品6 | 亚洲欧美日韩在线观看一区二区三区 | 美女脱18以下禁止看免费 | 日本人奶水中文影片 | 国产69精品久久久熟女 | 99九九免费热在线精品 | 好吊射视频988gaocom | 婷婷精品国产亚洲AV在线观看 | 午夜福利影院私人爽爽 | 亚洲精品九色在线网站 | 国产手机在线精品 | 精品无码国产自产在线观看 | 日日夜夜天天操 | 边摸边吃奶边做带声音 | 亚洲精品国产专区91在线 | 小莹的性荡生活 | 乌克兰美女x?x?y?y | 国产精品内射久久久久欢欢 | 亚洲午夜精品A片久久WWW软件 | 色多多污污在线播放免费 | 亚洲高清一区二区三区电影 | 91久久综合精品国产丝袜长腿 |