add returnpath for swiftmailer

This commit is contained in:
Frédéric FRANCE 2023-05-13 08:58:52 +02:00 committed by GitHub
parent afa116be30
commit c987f934b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019-2022 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2023 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -512,7 +512,7 @@ class CMailFile
// Give the message a subject
try {
$result = $this->message->setSubject($this->subject);
$this->message->setSubject($this->subject);
} catch (Exception $e) {
$this->errors[] = $e->getMessage();
}
@ -557,6 +557,14 @@ class CMailFile
}
}
if (!empty($this->errors_to)) {
try {
$this->message->setReturnPath($this->getArrayAddress($this->errors_to));
} catch (Exception $e) {
$this->errors[] = $e->getMessage();
}
}
try {
$this->message->setCharSet($conf->file->character_set_client);
} catch (Exception $e) {