forked from PHPMailer/PHPMailer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer setFrom() over separate From and FromName
- Loading branch information
Showing
3 changed files
with
12 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,8 +82,7 @@ $mail->Password = 'secret'; // SMTP password | |
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted | ||
$mail->Port = 587; // TCP port to connect to | ||
|
||
$mail->From = '[email protected]'; | ||
$mail->FromName = 'Mailer'; | ||
$mail->setFrom('[email protected]', 'Mailer'); | ||
$mail->addAddress('[email protected]', 'Joe User'); // Add a recipient | ||
$mail->addAddress('[email protected]'); // Name is optional | ||
$mail->addReplyTo('[email protected]', 'Information'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,9 @@ <h3>1. Advanced Example</h3> | |
|
||
$mail = new PHPMailer(); | ||
|
||
$mail->From = '[email protected]'; | ||
$mail->FromName = 'List manager'; | ||
$mail->Host = 'smtp1.example.com;smtp2.example.com'; | ||
$mail->Mailer = 'smtp'; | ||
$mail->setFrom('[email protected]', 'List manager'); | ||
$mail->Host = 'smtp1.example.com;smtp2.example.com'; | ||
$mail->Mailer = 'smtp'; | ||
|
||
@mysqli_connect('localhost','root','password'); | ||
@mysqli_select_db("my_company"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters