35 lines
875 B
Plaintext
35 lines
875 B
Plaintext
<?php
|
|
|
|
|
|
/**
|
|
* @file
|
|
* Install, update and uninstall functions for the Mailgun module.
|
|
*/
|
|
|
|
/**
|
|
* Implements hook_uninstall().
|
|
*/
|
|
function mailgun_uninstall() {
|
|
// Delete variables.
|
|
$variables = array('mailgun_api_key', 'mailgun_from_action', 'mailgun_from_name', 'mailgun_from_mail', 'mailgun_tracking', 'mailgun_tracking_clicks', 'mailgun_tracking_opens', 'mailgun_queue', 'mailgun_log', 'mailgun_format');
|
|
foreach ($variables as $variable) {
|
|
variable_del($variable);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Implements hook_enable().
|
|
*/
|
|
function mailgun_enable() {
|
|
mailsystem_set(array('mailgun_test' => 'MailgunMailSystem'));
|
|
}
|
|
|
|
/**
|
|
* Implements hook_disable().
|
|
*/
|
|
function mailgun_disable() {
|
|
// Tell Mail System to remove Mailgun and restore to defaults.
|
|
mailsystem_clear(array('mailgun_test' => 'MailgunMailSystem'));
|
|
watchdog('mailgun', 'Mailgun has been disabled.');
|
|
}
|