From cff938462d87130223398d8e6a794a906a7c7de7 Mon Sep 17 00:00:00 2001 From: Marcus Bointon Date: Fri, 29 Sep 2017 16:07:42 +0200 Subject: [PATCH] Can use __DIR__ now --- examples/DKIM_sign.phps | 2 +- examples/exceptions.phps | 2 +- examples/gmail.phps | 2 +- examples/mail.phps | 2 +- examples/pop_before_smtp.phps | 2 +- examples/sendmail.phps | 2 +- examples/smime_signed_mail.phps | 2 +- examples/smtp.phps | 2 +- examples/smtp_no_auth.phps | 2 +- examples/ssl_options.phps | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/DKIM_sign.phps b/examples/DKIM_sign.phps index 4a16db70..a204f939 100644 --- a/examples/DKIM_sign.phps +++ b/examples/DKIM_sign.phps @@ -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'; diff --git a/examples/exceptions.phps b/examples/exceptions.phps index 8d2a6061..a053eddd 100644 --- a/examples/exceptions.phps +++ b/examples/exceptions.phps @@ -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 diff --git a/examples/gmail.phps b/examples/gmail.phps index 83fe0fad..349c4b42 100644 --- a/examples/gmail.phps +++ b/examples/gmail.phps @@ -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'; diff --git a/examples/mail.phps b/examples/mail.phps index 9548de4b..35d331f1 100644 --- a/examples/mail.phps +++ b/examples/mail.phps @@ -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 diff --git a/examples/pop_before_smtp.phps b/examples/pop_before_smtp.phps index 464c455d..94222d81 100644 --- a/examples/pop_before_smtp.phps +++ b/examples/pop_before_smtp.phps @@ -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 diff --git a/examples/sendmail.phps b/examples/sendmail.phps index b1216d08..c05649ba 100644 --- a/examples/sendmail.phps +++ b/examples/sendmail.phps @@ -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 diff --git a/examples/smime_signed_mail.phps b/examples/smime_signed_mail.phps index 50ef0fa1..1951f7a1 100644 --- a/examples/smime_signed_mail.phps +++ b/examples/smime_signed_mail.phps @@ -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 diff --git a/examples/smtp.phps b/examples/smtp.phps index feb3681e..792d8d9c 100644 --- a/examples/smtp.phps +++ b/examples/smtp.phps @@ -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 diff --git a/examples/smtp_no_auth.phps b/examples/smtp_no_auth.phps index dc64bacc..c635434e 100644 --- a/examples/smtp_no_auth.phps +++ b/examples/smtp_no_auth.phps @@ -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 diff --git a/examples/ssl_options.phps b/examples/ssl_options.phps index 114ddffe..1cfc25c6 100644 --- a/examples/ssl_options.phps +++ b/examples/ssl_options.phps @@ -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()) {