move globals into $sugar_config

This commit is contained in:
Paweł Zdrojewski
2025-08-11 21:08:03 +02:00
parent 44031e27ce
commit 4253f834ac
3 changed files with 26 additions and 18 deletions

View File

@@ -184,15 +184,15 @@ $mail = new PHPMailer2 ();
$mail->From = $defaults['email'];
$mail->FromName = $defaults['name'];
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'system@e5.pl';
$mail->Password = 'upkb sxxb pmxw lsaj';
$mail->Host = $sugar_config['GMail_host'];
$mail->SMTPAuth = $sugar_config['SMTPAuth'];
$mail->Username = $sugar_config['GMail_address'];
$mail->Password = $sugar_config['password'];
$mail->CharSet = 'UTF-8';
$mail->charSet = "UTF-8";
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587;
$mail->CharSet = $sugar_config['CharSet'];
$mail->charSet = $sugar_config['CharSet'];
$mail->SMTPSecure = $sugar_config['SMTPSecure']; // Enable TLS encryption, `ssl` also accepted
$mail->Port = $sugar_config['port'];
$mail->Subject = from_html($emailTemp->subject);
if ($emailTemp->text_only != 1) {
$mail->IsHTML(true);