source: hadoop-register/etc/phpMailer/README @ 253

Last change on this file since 253 was 57, checked in by jazz, 16 years ago
  • 第一版 Hadoop 叢集之帳號申請網頁 by Wade
File size: 7.4 KB
Line 
1/*******************************************************************
2* The http://phpmailer.codeworxtech.com/ website now carries a few *
3* advertisements through the Google Adsense network. Please visit  *
4* the advertiser sites and help us offset some of our costs.       *
5* Thanks ....                                                      *
6********************************************************************/
7
8PHPMailer
9Full Featured Email Transfer Class for PHP
10==========================================
11
12Version 2.3 (November 08, 2008)
13
14We have removed the /phpdoc from the downloads. All documentation is now on
15the http://phpmailer.codeworxtech.com website.
16
17The phpunit.php has been updated to support PHP5.
18
19For all other changes and notes, please see the changelog.
20
21Donations are accepted at PayPal with our id "paypal@worxteam.com".
22
23Version 2.2 (July 15 2008)
24
25- see the changelog.
26
27Version 2.1 (June 04 2008)
28
29With this release, we are announcing that the development of PHPMailer for PHP5
30will be our focus from this date on. We have implemented all the enhancements
31and fixes from the latest release of PHPMailer for PHP4.
32
33Far more important, though, is that this release of PHPMailer (v2.1) is
34fully tested with E_STRICT error checking enabled.
35
36** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS.
37   IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE
38   APPRECIATED.
39
40We have now added S/MIME functionality (ability to digitally sign emails).
41BIG THANKS TO "sergiocambra" for posting this patch back in November 2007.
42The "Signed Emails" functionality adds the Sign method to pass the private key
43filename and the password to read it, and then email will be sent with
44content-type multipart/signed and with the digital signature attached.
45
46A quick note on E_STRICT:
47
48- In about half the test environments the development version was subjected
49  to, an error was thrown for the date() functions (used at line 1565 and 1569).
50  This is NOT a PHPMailer error, it is the result of an incorrectly configured
51  PHP5 installation. The fix is to modify your 'php.ini' file and include the
52  date.timezone = America/New York
53  directive, (for your own server timezone)
54- If you do get this error, and are unable to access your php.ini file, there is
55  a workaround. In your PHP script, add
56  date_default_timezone_set('America/Toronto');
57
58  * do NOT try to use
59  $myVar = date_default_timezone_get();
60  as a test, it will throw an error.
61
62We have also included more example files to show the use of "sendmail", "mail()",
63"smtp", and "gmail".
64
65We are also looking for more programmers to join the volunteer development team.
66If you have an interest in this, please let us know.
67
68Enjoy!
69
70
71Version 2.1.0beta1 & beta2
72
73please note, this is BETA software
74** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS
75INTENDED STRICTLY FOR TESTING
76
77** NOTE:
78
79As of November 2007, PHPMailer has a new project team headed by industry
80veteran Andy Prevost (codeworxtech). The first release in more than two
81years will focus on fixes, adding ease-of-use enhancements, provide
82basic compatibility with PHP4 and PHP5 using PHP5 backwards compatibility
83features. A new release is planned before year-end 2007 that will provide
84full compatiblity with PHP4 and PHP5, as well as more bug fixes.
85
86We are looking for project developers to assist in restoring PHPMailer to
87its leadership position. Our goals are to simplify use of PHPMailer, provide
88good documentation and examples, and retain backward compatibility to level
891.7.3 standards.
90
91If you are interested in helping out, visit http://sourceforge.net/projects/phpmailer
92and indicate your interest.
93
94**
95
96http://phpmailer.sourceforge.net/
97
98This software is licenced under the LGPL.  Please read LICENSE for information on the
99software availability and distribution.
100
101Class Features:
102- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs
103- Redundant SMTP servers
104- Multipart/alternative emails for mail clients that do not read HTML email
105- Support for 8bit, base64, binary, and quoted-printable encoding
106- Uses the same methods as the very popular AspEmail active server (COM) component
107- SMTP authentication
108- Native language support
109- Word wrap, and more!
110
111Why you might need it:
112
113Many PHP developers utilize email in their code.  The only PHP function
114that supports this is the mail() function.  However, it does not expose
115any of the popular features that many email clients use nowadays like
116HTML-based emails and attachments. There are two proprietary
117development tools out there that have all the functionality built into
118easy to use classes: AspEmail(tm) and AspMail.  Both of these
119programs are COM components only available on Windows.  They are also a
120little pricey for smaller projects.
121
122Since I do Linux development I’ve missed these tools for my PHP coding.
123So I built a version myself that implements the same methods (object
124calls) that the Windows-based components do. It is open source and the
125LGPL license allows you to place the class in your proprietary PHP
126projects.
127
128
129Installation:
130
131Copy class.phpmailer.php into your php.ini include_path. If you are
132using the SMTP mailer then place class.smtp.php in your path as well.
133In the language directory you will find several files like
134phpmailer.lang-en.php.  If you look right before the .php extension
135that there are two letters.  These represent the language type of the
136translation file.  For instance "en" is the English file and "br" is
137the Portuguese file.  Chose the file that best fits with your language
138and place it in the PHP include path.  If your language is English
139then you have nothing more to do.  If it is a different language then
140you must point PHPMailer to the correct translation.  To do this, call
141the PHPMailer SetLanguage method like so:
142
143// To load the Portuguese version
144$mail->SetLanguage("br", "/optional/path/to/language/directory/");
145
146That's it.  You should now be ready to use PHPMailer!
147
148
149A Simple Example:
150
151<?php
152require("class.phpmailer.php");
153
154$mail = new PHPMailer();
155
156$mail->IsSMTP();                                      // set mailer to use SMTP
157$mail->Host = "smtp1.example.com;smtp2.example.com";  // specify main and backup server
158$mail->SMTPAuth = true;     // turn on SMTP authentication
159$mail->Username = "jswan";  // SMTP username
160$mail->Password = "secret"; // SMTP password
161
162$mail->From = "from@example.com";
163$mail->FromName = "Mailer";
164$mail->AddAddress("josh@example.net", "Josh Adams");
165$mail->AddAddress("ellen@example.com");                  // name is optional
166$mail->AddReplyTo("info@example.com", "Information");
167
168$mail->WordWrap = 50;                                 // set word wrap to 50 characters
169$mail->AddAttachment("/var/tmp/file.tar.gz");         // add attachments
170$mail->AddAttachment("/tmp/image.jpg", "new.jpg");    // optional name
171$mail->IsHTML(true);                                  // set email format to HTML
172
173$mail->Subject = "Here is the subject";
174$mail->Body    = "This is the HTML message body <b>in bold!</b>";
175$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
176
177if(!$mail->Send())
178{
179   echo "Message could not be sent. <p>";
180   echo "Mailer Error: " . $mail->ErrorInfo;
181   exit;
182}
183
184echo "Message has been sent";
185?>
186
187CHANGELOG
188
189See ChangeLog.txt
190
191Download: http://sourceforge.net/project/showfiles.php?group_id=26031
192
193Andy Prevost
Note: See TracBrowser for help on using the repository browser.