$t('PHPMailer library'), 'severity' => REQUIREMENT_ERROR, 'description' => $t('PHPMailer module requires the PHPMailer library to properly send mail. Please download the PHPMailer package for PHP5/6, extract the archive and copy its contents to the following location: @phpmailer-path. Make sure the main PHPMailer class is located at @phpmailer-class-path.', array( '@phpmailer-url' => 'http://sourceforge.net/projects/phpmailer/files/phpmailer%20for%20php5_6/', '@phpmailer-path' => $path . '/phpmailer/', '@phpmailer-class-path' => $path . '/phpmailer/class.phpmailer.php', )), ); } else if ($phase == 'runtime') { module_load_include('php', 'phpmailer', 'phpmailer/class.phpmailer'); $mail = new PHPMailer(); $requirements['phpmailer'] = array( 'title' => $t('PHPMailer library'), 'value' => $mail->Version, 'severity' => REQUIREMENT_OK, ); } return $requirements; } /** * Implementation of hook_uninstall(). */ function phpmailer_uninstall() { variable_del('smtp_on'); variable_del('smtp_host'); variable_del('smtp_hostbackup'); variable_del('smtp_port'); variable_del('smtp_protocol'); variable_del('smtp_fromname'); variable_del('smtp_username'); variable_del('smtp_password'); variable_del('smtp_keepalive'); variable_del('smtp_debug'); }