Ejemplo n.º 1
0
/**
 * Handle a forward event.
 *
 * @param array $params
 *
 * @return array
 */
function civicrm_api3_mailing_event_forward($params)
{
    $job = $params['job_id'];
    $queue = $params['event_queue_id'];
    $hash = $params['hash'];
    $email = $params['email'];
    $fromEmail = CRM_Utils_Array::value('fromEmail', $params);
    $params = CRM_Utils_Array::value('params', $params);
    $forward = CRM_Mailing_Event_BAO_Forward::forward($job, $queue, $hash, $email, $fromEmail, $params);
    if ($forward) {
        return civicrm_api3_create_success($params);
    }
    return civicrm_api3_create_error('Queue event could not be found');
}
Ejemplo n.º 2
0
/**
 * Handle a forward event
 *
 * @param int $job_id           The job ID
 * @param int $queue_id         The queue ID
 * @param string $hash          Security hash
 * @param string $email         Forward destination address
 * @return boolean              True on success
 */
function crm_mailer_event_forward($job_id, $queue_id, $hash, $email)
{
    return CRM_Mailing_Event_BAO_Forward::forward($job_id, $queue_id, $hash, $email);
}
Ejemplo n.º 3
0
/**
 * Handle a forward event
 *
 * @param array $params
 *
 * @return array
 */
function civicrm_mailer_event_forward($params)
{
    $errors = _civicrm_mailer_check_params($params, array('job_id', 'event_queue_id', 'hash', 'email'));
    if (!empty($errors)) {
        return $errors;
    }
    $job = $params['job_id'];
    $queue = $params['event_queue_id'];
    $hash = $params['hash'];
    $email = $params['email'];
    $fromEmail = CRM_Utils_Array::value('fromEmail', $params);
    $params = CRM_Utils_Array::value('params', $params);
    $forward = CRM_Mailing_Event_BAO_Forward::forward($job, $queue, $hash, $email, $fromEmail, $params);
    if ($forward) {
        return civicrm_create_success();
    }
    return civicrm_create_error(ts('Queue event could not be found'));
}
Ejemplo n.º 4
0
/**
 * Handle a forward event
 *
 * @param int $job_id           The job ID
 * @param int $queue_id         The queue ID
 * @param string $hash          Security hash
 * @param string $email         Forward destination address
 * @return boolean              True on success
 */
function crm_mailer_event_forward($job_id, $queue_id, $hash, $email, $fromEmail = null, $params = null)
{
    return CRM_Mailing_Event_BAO_Forward::forward($job_id, $queue_id, $hash, $email, $fromEmail, $params);
}