相思资源网 Design By www.200059.com
<?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
// "foo@foobar.com", // sender's email
// array("paul@foobar.com", "foo@bar.com"), // To: recipients
// "paul@whereever.com" // 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 );
}
}
}
?>
////////////////////////////////////////////////////////////
// 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
// "foo@foobar.com", // sender's email
// array("paul@foobar.com", "foo@bar.com"), // To: recipients
// "paul@whereever.com" // 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 );
}
}
}
?>
相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com
暂无给多个地址发邮件的类的评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。