function send_email($entry_id, $form_id, $type) { if (current_user_can('frm_view_forms') or current_user_can('frm_edit_forms')) { if ($type == 'autoresponder') { $sent_to = FrmProNotification::autoresponder($entry_id, $form_id); } else { $sent_to = FrmProNotification::entry_created($entry_id, $form_id); } if (is_array($sent_to)) { echo implode(',', $sent_to); } else { echo $sent_to; } } else { _e('No one! You do not have permission', 'formidable'); } }
public static function send_email() { if (current_user_can('frm_view_forms') or current_user_can('frm_edit_forms') or current_user_can('frm_edit_entries')) { $entry_id = FrmAppHelper::get_param('entry_id'); $form_id = FrmAppHelper::get_param('form_id'); $type = FrmAppHelper::get_param('type'); if ($type == 'autoresponder') { $sent_to = FrmProNotification::autoresponder($entry_id, $form_id); } else { $sent_to = FrmProNotification::entry_created($entry_id, $form_id); } if (is_array($sent_to)) { $sent_to = implode(', ', $sent_to); } printf(__('Email Resent to %s', 'formidable'), $sent_to); } else { _e('Email Resent to No one! You do not have permission', 'formidable'); } die; }