Mail checks it -
* settingsMailServerCheck()). Microsoft 365 and Google Workspace sign in with
* an app registered with them, so those are set up in Admin > Mail; with one
* in use, this step keeps it and asks only for the address.
*/
defined('FROM_GETTING_STARTED') || die("Direct file access is not allowed");
$gs_mail = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT config_smtp_provider, config_smtp_host, config_smtp_port, config_smtp_encryption, config_smtp_username, config_smtp_password,
config_imap_provider, config_imap_host, config_imap_port, config_imap_encryption, config_imap_username, config_imap_password,
config_mail_from_email, config_mail_from_name, config_ticket_from_email, config_ticket_email_parse FROM settings WHERE company_id = 1")) ?: [];
$gs_mail_oauth = in_array($gs_mail['config_smtp_provider'] ?? '', ['google_oauth', 'microsoft_oauth'], true);
$gs_encryption = function ($starttls_port, $ssl_port) {
return ['tls' => "STARTTLS - usually port $starttls_port", 'ssl' => "SSL/TLS - usually port $ssl_port", '' => 'None'];
};
$gs_secret = function ($saved, $empty) {
return trim((string) $saved) !== '' ? 'Saved - type a new one to replace it' : $empty;
};
$gs_parse = intval($gs_mail['config_ticket_email_parse'] ?? 0) === 1;
?>