Can use __DIR__ now
This commit is contained in:
parent
2c06e68d22
commit
cff938462d
|
|
@ -18,7 +18,7 @@ $mail = new PHPMailer;
|
|||
$mail->setFrom('from@example.com', 'First Last');
|
||||
$mail->addAddress('whoto@example.com', 'John Doe');
|
||||
$mail->Subject = 'PHPMailer mail() test';
|
||||
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
$mail->msgHTML(file_get_contents('contents.html'), __DIR__);
|
||||
|
||||
//This should be the same as the domain of your From address
|
||||
$mail->DKIM_domain = 'example.com';
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ try {
|
|||
$mail->Subject = 'PHPMailer Exceptions test';
|
||||
//Read an HTML message body from an external file, convert referenced images to embedded,
|
||||
//and convert the HTML into a basic plain-text alternative body
|
||||
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
$mail->msgHTML(file_get_contents('contents.html'), __DIR__);
|
||||
//Replace the plain text body with one created manually
|
||||
$mail->AltBody = 'This is a plain-text message body';
|
||||
//Attach an image file
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ $mail->Subject = 'PHPMailer GMail SMTP test';
|
|||
|
||||
//Read an HTML message body from an external file, convert referenced images to embedded,
|
||||
//convert HTML into a basic plain-text alternative body
|
||||
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
$mail->msgHTML(file_get_contents('contents.html'), __DIR__);
|
||||
|
||||
//Replace the plain text body with one created manually
|
||||
$mail->AltBody = 'This is a plain-text message body';
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ $mail->addAddress('whoto@example.com', 'John Doe');
|
|||
$mail->Subject = 'PHPMailer mail() test';
|
||||
//Read an HTML message body from an external file, convert referenced images to embedded,
|
||||
//convert HTML into a basic plain-text alternative body
|
||||
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
$mail->msgHTML(file_get_contents('contents.html'), __DIR__);
|
||||
//Replace the plain text body with one created manually
|
||||
$mail->AltBody = 'This is a plain-text message body';
|
||||
//Attach an image file
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ try {
|
|||
$mail->Subject = 'PHPMailer POP-before-SMTP test';
|
||||
//Read an HTML message body from an external file, convert referenced images to embedded,
|
||||
//and convert the HTML into a basic plain-text alternative body
|
||||
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
$mail->msgHTML(file_get_contents('contents.html'), __DIR__);
|
||||
//Replace the plain text body with one created manually
|
||||
$mail->AltBody = 'This is a plain-text message body';
|
||||
//Attach an image file
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ $mail->addAddress('whoto@example.com', 'John Doe');
|
|||
$mail->Subject = 'PHPMailer sendmail test';
|
||||
//Read an HTML message body from an external file, convert referenced images to embedded,
|
||||
//convert HTML into a basic plain-text alternative body
|
||||
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
$mail->msgHTML(file_get_contents('contents.html'), __DIR__);
|
||||
//Replace the plain text body with one created manually
|
||||
$mail->AltBody = 'This is a plain-text message body';
|
||||
//Attach an image file
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ $mail->addAddress('whoto@example.com', 'John Doe');
|
|||
$mail->Subject = 'PHPMailer mail() test';
|
||||
//Read an HTML message body from an external file, convert referenced images to embedded,
|
||||
//Convert HTML into a basic plain-text alternative body
|
||||
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
$mail->msgHTML(file_get_contents('contents.html'), __DIR__);
|
||||
//Replace the plain text body with one created manually
|
||||
$mail->AltBody = 'This is a plain-text message body';
|
||||
//Attach an image file
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ $mail->addAddress('whoto@example.com', 'John Doe');
|
|||
$mail->Subject = 'PHPMailer SMTP test';
|
||||
//Read an HTML message body from an external file, convert referenced images to embedded,
|
||||
//convert HTML into a basic plain-text alternative body
|
||||
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
$mail->msgHTML(file_get_contents('contents.html'), __DIR__);
|
||||
//Replace the plain text body with one created manually
|
||||
$mail->AltBody = 'This is a plain-text message body';
|
||||
//Attach an image file
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ $mail->addAddress('whoto@example.com', 'John Doe');
|
|||
$mail->Subject = 'PHPMailer SMTP without auth test';
|
||||
//Read an HTML message body from an external file, convert referenced images to embedded,
|
||||
//convert HTML into a basic plain-text alternative body
|
||||
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
$mail->msgHTML(file_get_contents('contents.html'), __DIR__);
|
||||
//Replace the plain text body with one created manually
|
||||
$mail->AltBody = 'This is a plain-text message body';
|
||||
//Attach an image file
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ $mail->Subject = 'PHPMailer SMTP options test';
|
|||
|
||||
//Read an HTML message body from an external file, convert referenced images to embedded,
|
||||
//convert HTML into a basic plain-text alternative body
|
||||
$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
$mail->msgHTML(file_get_contents('contents.html'), __DIR__);
|
||||
|
||||
//Send the message, check for errors
|
||||
if (!$mail->send()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue