@@ -7,7 +7,7 @@ Build status: [](htt
7
7
- Probably the world's most popular code for sending email from PHP!
8
8
- Used by many open-source projects: Drupal, SugarCRM, Yii, Joomla! and many more
9
9
- Integrated SMTP support - send without a local mail server
10
- - Send emails with multiple TOs, CCs, BCCs and REPLY-TOs
10
+ - send emails with multiple TOs, CCs, BCCs and REPLY-TOs
11
11
- Multipart/alternative emails for mail clients that do not read HTML email
12
12
- Support for 8bit, base64, binary, and quoted-printable encoding
13
13
- SMTP authentication with LOGIN, PLAIN, NTLM and CRAM-MD5 mechanisms
@@ -42,7 +42,7 @@ require 'class.phpmailer.php';
42
42
43
43
$mail = new PHPMailer;
44
44
45
- $mail->IsSMTP (); // Set mailer to use SMTP
45
+ $mail->isSMTP (); // Set mailer to use SMTP
46
46
$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup server
47
47
$mail->SMTPAuth = true; // Enable SMTP authentication
48
48
$mail->Username = 'jswan'; // SMTP username
@@ -51,22 +51,22 @@ $mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl
51
51
52
52
$mail->From = '
[email protected] ';
53
53
$mail->FromName = 'Mailer';
54
- $mail->
AddAddress ('
[email protected] ', 'Josh Adams'); // Add a recipient
55
- $mail->
AddAddress ('
[email protected] '); // Name is optional
56
- $mail->
AddReplyTo ('
[email protected] ', 'Information');
57
- $mail->
AddCC ('
[email protected] ');
58
- $mail->
AddBCC ('
[email protected] ');
54
+ $mail->
addAddress ('
[email protected] ', 'Josh Adams'); // Add a recipient
55
+ $mail->
addAddress ('
[email protected] '); // Name is optional
56
+ $mail->
addReplyTo ('
[email protected] ', 'Information');
57
+ $mail->
addCC ('
[email protected] ');
58
+ $mail->
addBCC ('
[email protected] ');
59
59
60
60
$mail->WordWrap = 50; // Set word wrap to 50 characters
61
- $mail->AddAttachment ('/var/tmp/file.tar.gz'); // Add attachments
62
- $mail->AddAttachment ('/tmp/image.jpg', 'new.jpg'); // Optional name
63
- $mail->IsHTML (true); // Set email format to HTML
61
+ $mail->addAttachment ('/var/tmp/file.tar.gz'); // Add attachments
62
+ $mail->addAttachment ('/tmp/image.jpg', 'new.jpg'); // Optional name
63
+ $mail->isHTML (true); // Set email format to HTML
64
64
65
65
$mail->Subject = 'Here is the subject';
66
66
$mail->Body = 'This is the HTML message body <b >in bold!</b >';
67
67
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
68
68
69
- if(!$mail->Send ()) {
69
+ if(!$mail->send ()) {
70
70
echo 'Message could not be sent.';
71
71
echo 'Mailer Error: ' . $mail->ErrorInfo;
72
72
exit;
@@ -84,7 +84,7 @@ PHPMailer defaults to English, but in the `languages` folder you'll find numerou
84
84
85
85
``` php
86
86
// To load the French version
87
- $mail->SetLanguage ('fr', '/optional/path/to/language/directory/');
87
+ $mail->setLanguage ('fr', '/optional/path/to/language/directory/');
88
88
```
89
89
90
90
## Documentation
0 commit comments