l('Mailjet Test E-mail'); $message = $obj_mailjet->l('Hello').",\r\n\r\n".$obj_mailjet->l('This E-mail confirms you that Mailjet has successfully been installed on your shop.'); $result = Mail::sendMailTest(true, "in.mailjet.com", $message, $sujet, "text/plain", $email_from, $email_from, $_GET['mailjet_api_key'], $_GET['mailjet_secret_key'], $smtpPort = 465, "tls"); if ($result === true) echo "true"; else { if ($result == 999) $result = $obj_mailjet->l('The E-mail was not successfully sent'); echo "false|".$result; reset_config_mailjet(); } } catch(Exception $e) { echo "false|".$e->getMessage(); reset_config_mailjet(); } function reset_config_mailjet() { Configuration::updateValue('MAILJET_ACTIVATE', 0); Configuration::updateValue('PS_MAIL_METHOD', 1); Configuration::updateValue('PS_MAIL_SERVER', ""); Configuration::updateValue('PS_MAIL_USER', ""); Configuration::updateValue('PS_MAIL_PASSWD', ""); Configuration::updateValue('PS_MAIL_SMTP_ENCRYPTION', ""); Configuration::updateValue('PS_MAIL_SMTP_PORT', 25); }