- Hot Downloads
- Hot Article
PHPMailer_v2.0.0
- FileType: .zip
- Softsize: MB
- Type: English
- Language: English
- Accredit: Sharesoft
- Os: Win2003,WinXP,Win2000,Win9X
- Update: 2008-05-22
- Officialurl: http://
Introduce:
1. Advanced Example
2. Extending PHPMailer
Now here's a normal PHP page in the site, which will have all the defaults set above:
Normal PHP file: mail_test.php
This demonstrates sending out multiple email messages with binary attachments from a MySQL database with multipart/alternative support.
require("class.phpmailer.php");
|
2. Extending PHPMailer
Extending classes with inheritance is one of the most powerful features of object-oriented programming. It allows you to make changes to the original class for your own personal use without hacking the original classes. Plus, it is very easy to do. I've provided an example:
Here's a class that extends the PHPMailer class and sets the defaults for the particular site:
PHP include file: mail.inc.php
require("class.phpmailer.php");
|
Now here's a normal PHP page in the site, which will have all the defaults set above:
Normal PHP file: mail_test.php
require("mail.inc.php");
// Instantiate your new class
$mail = new MyMailer;
// Now you only need to add the necessary stuff
$mail->AddAddress("josh@site.com", "Josh Adams");
$mail->Subject = "Here is the subject";
$mail->Body = "This is the message body";
$mail->AddAttachment("c:/temp/11-10-00.zip", "new_name.zip"); // optional name
if(!$mail->Send())
{
echo "There was an error sending the message";
exit;
}
echo "Message was sent successfully";
Download Url:
☉Search PHPMailer_v2.0.0 In Google。
☉Search PHPMailer_v2.0.0 In Baidu。
☉Search PHPMailer_v2.0.0 In Yahoo。
☉Search PHPMailer_v2.0.0 In Baidu。
☉Search PHPMailer_v2.0.0 In Yahoo。
New CommentA total of 0 users commented on
Show All Comments
Comments

