smtp_from_name was accidentally set to smtp_from (#7029)

This uses the settings default value to set smtp_from_name to be set to
smtp_from if it does not have it's own value. The isset check on line
248 is no longer needed because smtp_from_name will always have a value
This commit is contained in:
frytimo 2024-06-28 11:47:17 -03:00 committed by GitHub
parent 5ea753295d
commit 7d493c3287
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 4 deletions

View File

@ -155,7 +155,7 @@
//get the email queue settings
$setting = new settings(["domain_uuid" => $domain_uuid]);
$smtp_from = $setting->get('email', 'smtp_from');
$smtp_from_name = $setting->get('email', 'smtp_from');
$smtp_from_name = $setting->get('email', 'smtp_from_name', $smtp_from);
$save_response = $setting->get('email_queue', 'save_response');
//debug information
@ -246,9 +246,7 @@
$email->subject = $email_subject;
$email->body = $email_body;
$email->from_address = $smtp_from;
if (isset($smtp_from_name)) {
$email->from_name = $smtp_from_name;
}
$email->from_name = $smtp_from_name;
if (isset($email_attachments)) {
$email->attachments = $email_attachments;
}