You are here

function mail_safety_admin_send_default_form in Mail Safety 7

Same name and namespace in other branches
  1. 7.2 mail_safety.admin.inc \mail_safety_admin_send_default_form()

Form constructor for the send to default mail address form.

See also

mail_safety_admin_send_default_form()

1 string reference to 'mail_safety_admin_send_default_form'
mail_safety_menu in ./mail_safety.module
Implements hook_menu().

File

./mail_safety.admin.inc, line 236
Admin functionality for Mail Safety

Code

function mail_safety_admin_send_default_form($form, $form_state, $mail) {
  $form = array();
  $form['to'] = array(
    '#type' => 'textfield',
    '#title' => t('Send to another address'),
    '#description' => t('Only use this field if you want the e-mail to go to an address other than the default address.'),
    '#default_value' => variable_get('mail_safety_default_mail_address', ''),
  );
  $form['mail_id'] = array(
    '#type' => 'value',
    '#value' => $mail['mail_id'],
  );
  $form['#submit'] = array(
    'mail_safety_admin_send_default_form_submit',
  );
  return confirm_form($form, t('Are you sure you want to send "@subject" to @to?', array(
    '@subject' => $mail['mail']['subject'],
    '@to' => variable_get('mail_safety_default_mail_address', ''),
  )), 'admin/config/development/mail_safety', t('This will send the mail to the default e-mail address.'), t('Send'));
}