From 04fb19c668f9856a65395562cc4b4eb128aceba6 Mon Sep 17 00:00:00 2001 From: Andrew Theken Date: Fri, 25 Mar 2016 10:57:42 -0400 Subject: [PATCH] Improve dashboard examples. --- page-settings.php | 68 +++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 40 deletions(-) diff --git a/page-settings.php b/page-settings.php index 41bee5e..9725258 100644 --- a/page-settings.php +++ b/page-settings.php @@ -91,16 +91,7 @@
This email must be a verified Sender Signature. It will appear as the "from" address on all outbound emails.

- You may override the "From" address set here on individual emails, by including a 'From' header with the address you wish to send from. This address must still be a confirmed Sender Signature associated with your account on Postmark. -
Example Override:
-
-                $headers = array();
-                $headers['From'] = 'some_other_address@example.com';
-                // send mail
-                $response = wp_mail( $to, $subject, $message, $headers );
-                
-

- For more information on setting headers using the wp_mail function, see the Wordpress Codex page. + You may override the "From" address set here on individual emails, by including a 'From' header with the address you wish to send from. See the example below.
@@ -108,7 +99,7 @@ - Force emails to be sent as HTML.

DEPRECATED: Instead of enabling this feature, add a header to your HTML message with name 'Content-Type' and value 'text/html'. See the example below. + Force emails to be sent as HTML.

DEPRECATED: Instead of enabling this feature, add a header to your HTML message with name 'Content-Type' and value 'text/html'. See the example below.
@@ -116,35 +107,7 @@ - Track email opens (which also requires emails to be "forced" to HTML).

DEPRECATED: Instead of enabling this feature, add a header to your HTML message called 'X-PM-Track-Opens' and a value of 'true'. See the example below. - - - - -

Overriding Sending Behavior for Individual Messages:

- "Forcing HTML" for Wordpress-generated emails (such as password reset emails) will cause them to be sent as HTML, this is often incorrect. Instead, individual messages should include the header above to have them treated as HTML instead of plain text - -

Example Overrides:

-
-                //Create a headers array:
-                $headers = array();
-
-                // Set this header if you want to override the default 'From' address:
-                $headers['From'] = 'john.smith@example.com';
-
-                // Set this header if you want the message to be sent as HTML.
-                $headers['Content-Type'] = 'text/html';
-                
-                // Set this header if you want to enable open tracking for this message.
-                // Setting this header also forces the message to be treated as HTML.
-                $headers['X-PM-Track-Opens'] = true;
-
-                // Send the email, including the $headers array we just created:
-                $response = wp_mail( $to, $subject, $message, $headers );
-
-                
-

- For more information on setting headers using the wp_mail function, see the Wordpress Codex page. + Track email opens (which also requires emails to be "forced" to HTML).

DEPRECATED: Instead of enabling this feature, add a header to your HTML message called 'X-PM-Track-Opens' and a value of 'true'. See the example below. @@ -171,4 +134,29 @@
+
+

Overriding Sending Behavior for Individual Messages:

+ "Forcing HTML" for Wordpress-generated emails (such as password reset emails) will cause them to be sent as HTML, this is often incorrect. Instead, individual messages should include the header above to have them treated as HTML instead of plain text + +

Example Overrides:

+
+        //Create a headers array:
+        $headers = array();
+
+        // Set this header if you want to override the default 'From' address:
+        $headers['From'] = 'john.smith@example.com';
+
+        // Set this header if you want the message to be sent as HTML.
+        $headers['Content-Type'] = 'text/html';
+        
+        // Set this header if you want to enable open tracking for this message.
+        // Setting this header also forces the message to be treated as HTML.
+        $headers['X-PM-Track-Opens'] = true;
+
+        // Send the email, including the $headers array we just created:
+        $response = wp_mail( $to, $subject, $message, $headers );
+
+        
+ For more information on setting headers using the wp_mail function, see the Wordpress Codex page. +