Title: Override E-mail Template
Last modified: April 16, 2020

---

# Override E-mail Template

 *  Resolved [whereverpanda](https://wordpress.org/support/users/whereverpanda/)
 * (@whereverpanda)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/override-e-mail-template/)
 * Hi there,
 * This is a very nice plugin!
 * I’m just a bit of a coding idiot and I would like to remove some of the styling
   in the e-mail notification that gets sent when an application is submitted.
 * I read in an earlier thread that you stated:
 * > You can override the applicant email template through by using the following
   > hook(sjb_applicant_email_template).
 * As someone who has no idea how to do work with hooks and filters, can you possibly
   help?
 * **I’m looking to change this:**
 *     ```
       $message = '<div style="width:700px; margin:0 auto;  border: 1px solid #95B3D7;font-family:Arial;">'
                       . '<div style="border: 1px solid #95B3D7; background-color:#95B3D7;">'
                       . ' <h2 style="text-align:center;">' . $header_title . '</h2>'
                       . ' </div>'
                       . '<div  style="margin:10px;">'
                       . '<p>' . date("Y/m/d") . '</p>'
                       . '<p>';
       ```
   
 * **To this:**
 *     ```
       $message = '<div style="width:600px; margin:0 auto;  border: 1px solid #ffffff;font-family:Arial;">'
                       . '<div style="border: 1px solid #ffffff; background-color:#ffffff;">'
                       . ' <h2 style="text-align:center;">' . $header_title . '</h2>'
                       . ' </div>'
                       . '<div  style="margin:10px;">'
                       . '<p>' . date("Y/m/d") . '</p>'
                       . '<p>';
       ```
   
 * I know I need to do this in my themes functions.php, but I have no idea how to
   do this.
 * Can you possibly help?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Ammar Younas](https://wordpress.org/support/users/ammaryounas12/)
 * (@ammaryounas12)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/override-e-mail-template/#post-12683243)
 * Hello [@whereverpanda](https://wordpress.org/support/users/whereverpanda/),
    
   You can use this filter sjb_email_start_template to override the email template.
   You can do this by adding this filter in your themes functions.php file.
 *     ```
       add('sjb_email_start_template', 'modify_email_template',10,3 );
       function modify_email_template($message, $notification_receiver, $post_id){
        // paste your code here
       }
       ```
   
 * Thank you for reaching us out. Let us know if we can assist you further.
 * Regards,
 *  Thread Starter [whereverpanda](https://wordpress.org/support/users/whereverpanda/)
 * (@whereverpanda)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/override-e-mail-template/#post-12689870)
 * Hi Ammar,
 * Thanks for this, but putting that in functions.php breaks the site with this 
   message:
 * > Uncaught Error: Call to undefined function add()
 * I’ve tried using add_filter instead of add, which doesn’t give an error, but 
   just makes the header disappear from the e-mail completely
 * Here is my code. Can you see anything wrong?
 *     ```
       add_filter('sjb_email_start_template', 'modify_email_template',10,3 );
       function modify_email_template($message, $notification_receiver, $post_id){
               $message = '<div style="width:600px; margin:0 auto;  border: 1px solid #ff0000;font-family:Helvetica;">'
                       . '<div style="border: 1px solid #ff0000; background-color:#ff0000;">'
                       . ' <h2 style="text-align:center;">' . $header_title . '</h2>'
                       . ' </div>'
                       . '<div  style="margin:10px;">'
                       . '<p>' . date("Y/m/d") . '</p>'
                       . '<p>';
       }
       ```
   
 * Thanks for your quick reply!
 *  [Ammar Younas](https://wordpress.org/support/users/ammaryounas12/)
 * (@ammaryounas12)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/override-e-mail-template/#post-12689957)
 * Hi [@whereverpanda](https://wordpress.org/support/users/whereverpanda/),
 * You forget to return the $message in your code. Please try the below code.
 *     ```
       add_filter('sjb_email_start_template', 'modify_email_template',10,3 );
       function modify_email_template($message, $notification_receiver, $post_id){
               $message = '<div style="width:600px; margin:0 auto;  border: 1px solid #ff0000;font-family:Helvetica;">'
                       . '<div style="border: 1px solid #ff0000; background-color:#ff0000;">'
                       . ' <h2 style="text-align:center;">' . $header_title . '</h2>'
                       . ' </div>'
                       . '<div  style="margin:10px;">'
                       . '<p>' . date("Y/m/d") . '</p>'
                       . '<p>';
   
                   return $message;
       }
       ```
   
 * Let us know if there is still any issue.
 * Regards,
 *  Thread Starter [whereverpanda](https://wordpress.org/support/users/whereverpanda/)
 * (@whereverpanda)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/override-e-mail-template/#post-12690023)
 * That did the trick – sorry I’m an absolute idiot when it comes to these hooks
   and functions!
 * Thanks a ton!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Override E-mail Template’ is closed to new replies.

 * ![](https://ps.w.org/simple-job-board/assets/icon-256x256.png?rev=1829069)
 * [Simple Job Board](https://wordpress.org/plugins/simple-job-board/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-job-board/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-job-board/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-job-board/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-job-board/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-job-board/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [whereverpanda](https://wordpress.org/support/users/whereverpanda/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/override-e-mail-template/#post-12690023)
 * Status: resolved