function contact_mail_user
6.x contact.pages.inc | contact_mail_user(&$form_state, $recipient) |
1 string reference to 'contact_mail_user'
- contact_user_page in drupal-6.x/
modules/ contact/ contact.pages.inc - Personal contact page.
File
- drupal-6.x/
modules/ contact/ contact.pages.inc, line 173 - User page callbacks for the contact module.
Code
function contact_mail_user(&$form_state, $recipient) {
global $user;
$form['#token'] = $user->name . $user->mail;
$form['recipient'] = array('#type' => 'value', '#value' => $recipient);
$form['from'] = array('#type' => 'item',
'#title' => t('From'),
'#value' => theme('username', $user) . ' <' . check_plain($user->mail) . '>',
);
$form['to'] = array('#type' => 'item',
'#title' => t('To'),
'#value' => theme('username', $recipient),
);
$form['subject'] = array('#type' => 'textfield',
'#title' => t('Subject'),
'#maxlength' => 50,
'#required' => TRUE,
);
$form['message'] = array('#type' => 'textarea',
'#title' => t('Message'),
'#rows' => 15,
'#required' => TRUE,
);
$form['copy'] = array('#type' => 'checkbox',
'#title' => t('Send yourself a copy.'),
);
$form['submit'] = array('#type' => 'submit',
'#value' => t('Send e-mail'),
);
return $form;
}