View source
<?php
function mail_debugger_common_mail_debugger_info() {
return array(
'basic' => array(
'include' => array(
'inc',
'mail_debugger_common',
'includes/basic.mail_debugger',
),
'title' => 'Basic',
'form' => 'mail_debugger_basic_form',
'validate' => 'mail_debugger_basic_form_validate',
'submit' => 'mail_debugger_basic_form_submit',
'weight' => -100,
),
'user' => array(
'include' => array(
'inc',
'mail_debugger_common',
'includes/user.mail_debugger',
),
'title' => 'User',
'form' => 'mail_debugger_user_form',
'validate' => 'mail_debugger_user_form_validate',
'submit' => 'mail_debugger_user_form_submit',
'weight' => -90,
),
);
}
function mail_debugger_common_menu() {
return array(
'admin/config/development/mail_debugger/user_autocomplete_mail' => array(
'page callback' => 'mail_debugger_user_callback_autocomplete_mail',
'access arguments' => array(
'use mail debugger user',
),
'file' => 'includes/user.mail_debugger.inc',
'type' => MENU_CALLBACK,
),
);
}
function mail_debugger_common_mail($key, &$message, $params) {
switch ($key) {
case 'basic':
$message['body'] = array(
$params['body'],
);
$message['subject'] = $params['subject'];
break;
default:
break;
}
}
function mail_debugger_common_permission() {
return array(
'use mail debugger basic' => array(
'title' => t('Use mail debugger basic'),
'restrict access' => TRUE,
),
'use mail debugger user' => array(
'title' => t('Use mail debugger user'),
'restrict access' => TRUE,
),
);
}