function webform_email_load in Webform 6.3
Same name and namespace in other branches
- 7.4 includes/webform.emails.inc \webform_email_load()
- 7.3 includes/webform.emails.inc \webform_email_load()
Load an e-mail setting from the database or initialize a new e-mail.
1 call to webform_email_load()
- webform_menu_email_load in ./
webform.module - Menu loader callback. Load a webform e-mail if the given eid is a valid.
File
- includes/
webform.emails.inc, line 513 - Provides interface and database handling for e-mail settings of a webform.
Code
function webform_email_load($eid, $nid) {
$node = node_load($nid);
if ($eid == 'new') {
$email = array(
'email' => '',
'subject' => 'default',
'from_name' => 'default',
'from_address' => 'default',
'template' => 'default',
'excluded_components' => array(),
'html' => variable_get('webform_default_format', 0),
'attachments' => 0,
);
}
else {
$email = isset($node->webform['emails'][$eid]) ? $node->webform['emails'][$eid] : FALSE;
if (variable_get('webform_format_override', 0)) {
$email['html'] = variable_get('webform_default_format', 0);
}
}
return $email;
}