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