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