Answers.Body: <p>The Sprout Email Example Notification templates are designed to illustrate an example of the the Events that take place when a user is saved. They illustrate how to set custom variables for the User Events in both the Control Panel and in the template itself.  While in most cases, you won't need to customize things in both places, the example is meant to be illustrative of what is possible so you can decide what the best option is for your situation.</p>
  
  <p>The issue here arises when the Notification in the Control Panel is updated to be triggered on a Entry-related event, instead of a User-related Event, and the same notification template is used.</p>
  
  <p>When the Entry-related Event is fired, the User-specific template tries to access user-specific variables and a Twig processing error causes the template to err out.</p>
  
  <p>The key thing to understand here is that, when Sprout Email fires an Event, it only has two types of variables available to the template you are using:</p>
  
  <ol>
  <li>Information about the Notification Email itself, like the Subject Line. This info is available via the <code>entry</code> object (i.e. <code>{{ entry.subjectLine }}</code>)</li>
  <li>Information about the Event the trigger is associated with.  This information may change depending on the Event you are using.  This info is always available via the <code>object</code> variable (i.e. <code>{{ object.value }}</code>), but the available values will differ based on the event.</li>
  </ol>
  
  <p>To fix this issue, you need create templates for your Notification Email that:</p>
  
  <ol>
  <li>Are built in a generic way so that they make no assumptions about what variables will be passed to the template.  If dynamic variables are needed, they can be handled directly in the fields within the Control Panel.</li>
  <li>Are designed to expect the right variables for the Event that they are being used for.</li>
  </ol>
  
  <p>If you run into trouble, try simplifying the templates you're using to hard-coded text.  Confirm that the Event is working as expected and that the Notification email is being fired as expected.  Once you confirm that, then try to add in variables in one by one and testing to confirm you're adding the variables correctly.</p>
  
  <p>Sprout Email creates a log file at <code>craft/storage/runtime/logs/sproutemail.log</code>. You should see any template errors that may be happening there to help troubleshoot and diagnose what is happening.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-02T05:04:03.150Z
Answers.LastActivityDate: 2015-09-02T05:04:03.150Z
Answers.UserDisplayName: Ben Parizek
Body: <p>Using the Sprout Email plugin. The only notification triggers that are working are related to users. Any notifications with triggers related to entries (created, updated, deleted) do not send an email, not even a test email.</p>
  
  <p>I'm using Craft Client 2.4.2688.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-27T01:01:48.537Z
Comments.Text: Hey Ryan, Are you using the same notification and settings for both the User and Entries scenarios? Are you using any custom variables in your template that may be specific to one scenario and not the other?  Can you update the post here with more information on the settings you have for both scenarios and what your templates look like?
Comments.UserDisplayName: Ben Parizek
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-28T18:19:05.470Z
Comments.Text: Hey @BenParizek, I'm actually just using the example notifications and templates that were set up upon plugin installation. : https://infinit.io/_/Bz2xTTZ
Comments.UserDisplayName: Ryan James
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-29T14:20:02.987Z
Comments.Text: Sounds like we may need to dig a bit deeper here.  Can you send over your logs and db to sprout@barrelstrengthdesign.com?
Comments.UserDisplayName: Ben Parizek
Tags: <plugin-sproutemail>
Title: Entry saved trigger not working
ThreadText: # Entry saved trigger not working
  
  (Asked by: username_0 on 2015-08-26)
  
  Using the Sprout Email plugin. The only notification triggers that are working are related to users. Any notifications with triggers related to entries (created, updated, deleted) do not send an email, not even a test email.
  
  I'm using Craft Client 2.4.2688.
  
  **Tags:** plugin-sproutemail
  
  > **Comments:**
  > **username_1**: Hey username_0, Are you using the same notification and settings for both the User and Entries scenarios? Are you using any custom variables in your template that may be specific to one scenario and not the other?  Can you update the post here with more information on the settings you have for both scenarios and what your templates look like?  
  > **username_0**: Hey @username_1, I'm actually just using the example notifications and templates that were set up upon plugin installation. : https://infinit.io/_/Bz2xTTZ  
  > **username_1**: Sounds like we may need to dig a bit deeper here.  Can you send over your logs and db to sprout@barrelstrengthdesign.com?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-09-02. Score: 2
  
  The Sprout Email Example Notification templates are designed to illustrate an example of the the Events that take place when a user is saved. They illustrate how to set custom variables for the User Events in both the Control Panel and in the template itself. While in most cases, you won't need to customize things in both places, the example is meant to be illustrative of what is possible so you can decide what the best option is for your situation.
  
  The issue here arises when the Notification in the Control Panel is updated to be triggered on a Entry-related event, instead of a User-related Event, and the same notification template is used.
  
  When the Entry-related Event is fired, the User-specific template tries to access user-specific variables and a Twig processing error causes the template to err out.
  
  The key thing to understand here is that, when Sprout Email fires an Event, it only has two types of variables available to the template you are using:
  
  1. Information about the Notification Email itself, like the Subject Line. This info is available via the `entry` object (i.e. `{{ entry.subjectLine }}`)
  2. Information about the Event the trigger is associated with. This information may change depending on the Event you are using. This info is always available via the `object` variable (i.e. `{{ object.value }}`), but the available values will differ based on the event.
  
  To fix this issue, you need create templates for your Notification Email that:
  
  1. Are built in a generic way so that they make no assumptions about what variables will be passed to the template. If dynamic variables are needed, they can be handled directly in the fields within the Control Panel.
  2. Are designed to expect the right variables for the Event that they are being used for.
  
  If you run into trouble, try simplifying the templates you're using to hard-coded text. Confirm that the Event is working as expected and that the Notification email is being fired as expected. Once you confirm that, then try to add in variables in one by one and testing to confirm you're adding the variables correctly.
  
  Sprout Email creates a log file at `craft/storage/runtime/logs/sproutemail.log`. You should see any template errors that may be happening there to help troubleshoot and diagnose what is happening.
  
  
  ---
  
  