Answers.Body: <p>You could also use the CiviRules extension in combination with the Email API extension. 
  That enables you to add a trigger for a membership change, set the condition to status is ...... and then send a mail. </p>
  
  <p>CiviRules can be found here: <a href="https://civicrm.org/extensions/civirules" rel="nofollow noreferrer">https://civicrm.org/extensions/civirules</a> and the Email API here: <a href="https://civicrm.org/extensions/e-mail-api" rel="nofollow noreferrer">https://civicrm.org/extensions/e-mail-api</a></p>
  
  <p>Documentation on CiviRules is here: <a href="https://docs.civicrm.org/civirules/en/latest/" rel="nofollow noreferrer">https://docs.civicrm.org/civirules/en/latest/</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-05T11:24:10.177Z
Answers.LastActivityDate: 2017-12-05T11:24:10.177Z
Answers.UserDisplayName: ErikH - CiviCooP
Answers.Body: <p>Sure it's possible. You'll need to use a couple of hooks to inspect what's going on and act accordingly. Here's the bare bones of what I would do in WordPress:</p>
  
  <pre><code>class My_Plugin_Class {
  
      public $status_id;
  
      public function __construct() {
          add_action( 'civicrm_pre', array( $this, 'pre_update' ), 10, 4 );
          add_action( 'civicrm_post', array( $this, 'post_update' ), 10, 4 );
      }
  
      public function pre_update( $op, $objectName, $objectId, $objectRef ) {
          if ( $objectName != 'Membership' ) return;
          if ( ! isset( $objectRef-&gt;contact_id ) ) return;
  
          // save status prior to change
          $this-&gt;status_id = $objectRef-&gt;status_id;
      }
  
      public function post_update( $op, $objectName, $objectId, $objectRef ) {
          if ( $objectName != 'Membership' ) return;
          if ( ! isset( $objectRef-&gt;contact_id ) ) return;
          if ( $op == 'delete' ) return;
  
          // make sure the status is actually changing
          if ( $this-&gt;status_id == $objectRef-&gt;status_id ) return;
  
          // write code to send your email...
  
      }
  
  }
  </code></pre>
  
  <p>Drupal/Joomla would need slightly different code, but the principle would remain the same - i.e. inspect the membership status before and after the change and send you email if the change meets your conditions.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-05T10:18:33.880Z
Answers.LastActivityDate: 2017-12-05T10:18:33.880Z
Answers.UserDisplayName: Christian Wach
Answers.Body: <p>You can use Schedule Reminders (under Admin/Communications menu) and the entity you want to trigger the reminder is an Activity called "Change Membership Status". You can then set it to send you an email.</p>
  
  <p>This won't let you specify the type of membership change (eg New -> Current), but it's very easy to set up and the email could include a link to a report that the user could click on to show recent membership changes.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-07T09:09:43.523Z
Answers.LastActivityDate: 2017-12-07T09:09:43.523Z
Answers.UserDisplayName: Stuart Parker
Body: <p>I'm trying to figure out if it's possible to trigger an e-mail when a membership changes status, for example when going from New -> Current in memberships.</p>
  
  <p>Is it possible?</p>
  
Tags: <civimail><civimember>
Title: Is it possible to trigger e-mail on specific CiviMember transition?
ThreadText: # Is it possible to trigger e-mail on specific CiviMember transition?
  
  (Asked by: username_0 on 2017-12-04)
  
  I'm trying to figure out if it's possible to trigger an e-mail when a membership changes status, for example when going from New -> Current in memberships.
  
  Is it possible?
  
  **Tags:** civimail, civimember
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2017-12-05. Score: 4
  
  You could also use the CiviRules extension in combination with the Email API extension.
  That enables you to add a trigger for a membership change, set the condition to status is ...... and then send a mail.
  
  CiviRules can be found here: <https://civicrm.org/extensions/civirules> and the Email API here: <https://civicrm.org/extensions/e-mail-api>
  
  Documentation on CiviRules is here: <https://docs.civicrm.org/civirules/en/latest/>
  
  
  ---
  
  ### Answer by username_2 on 2017-12-05. Score: 2
  
  Sure it's possible. You'll need to use a couple of hooks to inspect what's going on and act accordingly. Here's the bare bones of what I would do in WordPress:
  class My_Plugin_Class {
  
      public $status_id;
  
      public function __construct() {
          add_action( 'civicrm_pre', array( $this, 'pre_update' ), 10, 4 );
          add_action( 'civicrm_post', array( $this, 'post_update' ), 10, 4 );
      }
  
      public function pre_update( $op, $objectName, $objectId, $objectRef ) {
          if ( $objectName != 'Membership' ) return;
          if ( ! isset( $objectRef->contact_id ) ) return;
  
          // save status prior to change
          $this->status_id = $objectRef->status_id;
      }
  
      public function post_update( $op, $objectName, $objectId, $objectRef ) {
          if ( $objectName != 'Membership' ) return;
          if ( ! isset( $objectRef->contact_id ) ) return;
          if ( $op == 'delete' ) return;
  
          // make sure the status is actually changing
          if ( $this->status_id == $objectRef->status_id ) return;
  
          // write code to send your email...
  
      }
  
  }
  
  Drupal/Joomla would need slightly different code, but the principle would remain the same - i.e. inspect the membership status before and after the change and send you email if the change meets your conditions.
  
  
  ---
  
  ### Answer by username_3 on 2017-12-07. Score: 1
  
  You can use Schedule Reminders (under Admin/Communications menu) and the entity you want to trigger the reminder is an Activity called "Change Membership Status". You can then set it to send you an email.
  
  This won't let you specify the type of membership change (eg New -> Current), but it's very easy to set up and the email could include a link to a report that the user could click on to show recent membership changes.
  
  
  ---
  
  