This class can be used in mass mailing mode. the Test environment is linux. the system must install sendmail to use if (! Defined (MAIL_CLASS_DEFINED) {define (MAIL_CLASS_DEFINED, 1); classemail {functionemail ($ subject, $ message, $ senderNa this class can be used in mass mailing, the test environment is linux, and sendmail must be installed to use it.
If (! Defined ('mail _ CLASS_DEFINED ')){
Define ('mail _ CLASS_DEFINED ', 1 );
// CC
If ($ this-> cc ){
$ This-> headers. = "Cc:". $ this-> cc ."";
}
// Secretly CC
If ($ this-> bcc ){
$ This-> headers. = "Bcc:". $ this-> bcc ."";
}
Return mail ($ this-> to, $ this-> subject, $ this-> message, $ this-> headers); // return the result
}
}
}
?>
Note:
Parameter description
----------
-The following parameters are required: subject, message, senderName, senderEmail, and toList
-These parameters are optional: ccList, bccList, and replyTo.
-ToList, ccList, and bccList must be valid email addresses.
For example
-------
$ M = new email ("greetings", subject
"How are you? ", Text
"Wing", sender name
"Wing@linuxaid.com.cn", sender email
Array ("aa@aa.com", "bb@bb.com"), recipient
CC "cc@cc.com"
);
Print "the email has been sent. sending result:". $ m-> send ();
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.