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