Auto email people moving from bookedin/waiting list to not-coming list
This commit is contained in:
@@ -148,8 +148,8 @@ function _booking_balance_payment_email($nid)
|
||||
|
||||
//send the email
|
||||
drupal_mail('booking', 'registration_mail_bal_outstanding', $to, $language, $params, $from);
|
||||
//drupal_mail('booking', 'registration_mail_bal_outstanding', variable_get('booking_notify_email', variable_get('site_mail', ini_get('sendmail_from'))),
|
||||
// $language, $params, $from);
|
||||
drupal_mail('booking', 'registration_mail_bal_outstanding', variable_get('booking_notify_email', variable_get('site_mail', ini_get('sendmail_from'))),
|
||||
$language, $params, $from);
|
||||
drupal_mail('booking', 'registration_mail_bal_outstanding', 'it@coadcorp.com', $language, $params, $from);
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ function _booking_promoted_from_waitinglist_email($nid)
|
||||
$params['subject'] = $subject;
|
||||
|
||||
//retrieve the body of the email
|
||||
$params['body'] = token_replace(variable_get($booking_email_waitinglistpromotion), $tokens);
|
||||
$params['body'] = token_replace(variable_get('booking_email_waitinglistpromotion'), $tokens);
|
||||
|
||||
//send the email
|
||||
drupal_mail('booking', 'booking_email_custom', $to, $language, $params, $from);
|
||||
@@ -229,6 +229,42 @@ function _booking_promoted_from_waitinglist_email($nid)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to generate email to be sent to the attendee once they pull out and move to the not-coming list
|
||||
*
|
||||
* @param $nid - the registration node
|
||||
*/
|
||||
function _booking_demoted_to_notcoming_email($nid)
|
||||
{
|
||||
global $event;
|
||||
global $user;
|
||||
$language = user_preferred_language($user);
|
||||
|
||||
//load the node matching this id
|
||||
$node = node_load($nid);
|
||||
$tokens = booking_define_personspecific_tokens($node);
|
||||
|
||||
//calculate the from email address
|
||||
$from = t('!event Registrations <!email>', array('!event' => $event->booking_eventname,
|
||||
'!email' => variable_get('booking_contact_email', variable_get('site_mail', ini_get('sendmail_from')))
|
||||
));
|
||||
|
||||
//calculate the remaining parameters
|
||||
$to = $node->booking_email;
|
||||
$subject = token_replace(variable_get($booking_email_notcoming_demotion_subject, t('!event', array('!event' => $event->booking_eventname))), $tokens);
|
||||
//$subject = t('!event withdrawal confirmation', array('!event' => $event->booking_eventname));
|
||||
$params['subject'] = $subject;
|
||||
|
||||
//retrieve the body of the email
|
||||
$params['body'] = token_replace(variable_get('booking_email_notcoming_demotion'), $tokens);
|
||||
|
||||
//send the email
|
||||
drupal_mail('booking', 'booking_email_custom', $to, $language, $params, $from);
|
||||
drupal_mail('booking', 'booking_email_custom', variable_get('booking_notify_email', variable_get('site_mail', ini_get('sendmail_from'))),
|
||||
$language, $params, $from);
|
||||
drupal_mail('booking', 'booking_email_custom', 'it@coadcorp.com', $language, $params, $from);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
function _booking_promoted_from_waitinglist_email_old($nid)
|
||||
|
Reference in New Issue
Block a user