Title: Code Snippets Plugin
Last modified: March 27, 2024

---

# Code Snippets Plugin

 *  [jimtturner](https://wordpress.org/support/users/jimtturner/)
 * (@jimtturner)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/code-snippets-plugin/)
 * Trying to send myself an email whenever my ‘message’ page is loaded using the
   Code Snippets Plugin. I’ve searched forums and google for an example and have
   tried a few different ideas but so far nothing works. This is the latest code
   I have tried:
 * if(is_page(‘message’))
   {
 * $fromName = ‘Auto email notification system’;
 * $subject = ‘Confirmed’;
 * /* Mail Address _/ $toAddr = ‘jimtturner@aol.com’; $bccAddr = ‘jimtturner@aol.
   com’; $fromAddr = ‘jimtturner@aol.com’; /_ End Mail Address */
 * /* Mail Body */
   $msg = ‘my messages about confirmation…‘;
 * $msg = wordwrap($msg, 70);
   /* End Mail Body */
 * /* Mail Headers Setup _/ $headers = array(); $headers[] = “MIME-Version: 1.0”;
   $headers[] = “Content-type: text/html; charset=utf-8”; $headers[] = “From: “.
   $fromName.” <“.$fromAddr.”>”; $headers[] = “Bcc: <“.$bccAddr.”>”; /_ End Mail
   Headers Setup */
 * mail($toAddr, $subject, $msg, implode(“\r\n”, $headers));
 * }
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcode-snippets-plugin%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Code Snippets Plugin’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)

 * 0 replies
 * 1 participant
 * Last reply from: [jimtturner](https://wordpress.org/support/users/jimtturner/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/code-snippets-plugin/)
 * Status: not a support question