/** update smtp details */ public static function update_smtp_details() { $mailin = new Mailin('https://api.sendinblue.com/v1.0', SIB_Manager::$access_key, SIB_Manager::$secret_key); $response = $mailin->get_smtp_details(); if ($response['code'] == 'success') { if ($response['data']['relay_data']['status'] == 'enabled') { self::$smtp_details = $response['data']['relay_data']['data']; update_option(self::attribute_smtp_name, self::$smtp_details); return true; } else { self::$smtp_details = array('relay' => false); update_option(self::attribute_smtp_name, self::$smtp_details); $home_settings = get_option(self::home_option_name, array()); $home_settings['activate_email'] = 'no'; update_option(SIB_Manager::home_option_name, $home_settings); return false; } } return false; }