You are here

README.txt in Mail Debugger 7.3

Same filename and directory in other branches
  1. 7 README.txt
  2. 7.2 README.txt
# Mail debugger
A module to test the mail system

# Features
* Send user account mails
* Send custom mails
* API for integration with other modules, like commerce (todo!)

# API
Extend this module by implementing one of these hooks:

## hook_mail_debugger_info
* include - (optional) An include file array, enter the parameters from module_load_include
* title - Tab title
* form - Form elements callback
* submit - Execute sending the mail
* validate (optional) - validate the values
* weight (optional) - Sort order of tabs

## hook_mail_debugger_info_alter
* Change any of the provided tabs

## form callback
Please note: don't define required fields. Use a validate callback to do so.
function form_callback($default_values, &$form_state) {
  // $default_values: array of default values
  // $form_state: access to the form_state parameter
}

## validate callback
function form_callback($values, $element, &$form_state) {
  // $values: array of values
  // $element: element name for each value for use in the form_set_error function.
  // $form_state: access to the form_state parameter
}

## submit callback
function form_callback($values, &form_state) {
  // $values: array of values
  // $form_state: access to the form_state parameter
}

File

README.txt
View source
  1. # Mail debugger
  2. A module to test the mail system
  3. # Features
  4. * Send user account mails
  5. * Send custom mails
  6. * API for integration with other modules, like commerce (todo!)
  7. # API
  8. Extend this module by implementing one of these hooks:
  9. ## hook_mail_debugger_info
  10. * include - (optional) An include file array, enter the parameters from module_load_include
  11. * title - Tab title
  12. * form - Form elements callback
  13. * submit - Execute sending the mail
  14. * validate (optional) - validate the values
  15. * weight (optional) - Sort order of tabs
  16. ## hook_mail_debugger_info_alter
  17. * Change any of the provided tabs
  18. ## form callback
  19. Please note: don't define required fields. Use a validate callback to do so.
  20. function form_callback($default_values, &$form_state) {
  21. // $default_values: array of default values
  22. // $form_state: access to the form_state parameter
  23. }
  24. ## validate callback
  25. function form_callback($values, $element, &$form_state) {
  26. // $values: array of values
  27. // $element: element name for each value for use in the form_set_error function.
  28. // $form_state: access to the form_state parameter
  29. }
  30. ## submit callback
  31. function form_callback($values, &form_state) {
  32. // $values: array of values
  33. // $form_state: access to the form_state parameter
  34. }