mailjet.install 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * @file
  4. * Functions called while installing, uninstalling or activation of the module.
  5. */
  6. /**
  7. * Implements hook_install().
  8. */
  9. function mailjet_install() {
  10. variable_set('mailjet_debug', FALSE);
  11. }
  12. /**
  13. * Implements hook_uninstall().
  14. */
  15. function mailjet_uninstall() {
  16. variable_del('mailjet_from');
  17. variable_del('mailjet_host');
  18. variable_del('mailjet_on');
  19. variable_del('mailjet_password');
  20. variable_del('mailjet_port');
  21. variable_del('mailjet_protocol');
  22. variable_del('mailjet_test');
  23. variable_del('mailjet_test_address');
  24. variable_del('mailjet_username');
  25. variable_del('mailjet_allowhtml');
  26. variable_del('mailjet_debug');
  27. }
  28. /**
  29. * Implements hook_disable().
  30. */
  31. function mailjet_disable() {
  32. variable_set('mailjet_on', FALSE);
  33. variable_set('mail_system', array('default-system' => 'DefaultMailSystem'));
  34. }
  35. /**
  36. * Implements hook_update().
  37. */
  38. function mailjet_update_7000() {
  39. if (variable_get('mailjet_on', FALSE)) {
  40. variable_set('mail_system', array('default-system' => 'MailjetSmtpMailSystem'));
  41. }
  42. }