Skip to content
Snippets Groups Projects
Commit 346f8e0d authored by Demian Katz's avatar Demian Katz Committed by Robert Lange
Browse files

Make server name configurable in Mailer.

parent e70feecc
Branches
Tags
No related merge requests found
......@@ -499,6 +499,8 @@ host = localhost
port = 25
;username = user
;password = pass
; The server name to report to the upstream mail server when sending mail.
;name = vufind.myuniversity.edu
; If a login is required you can define which protocol to use for securing the
; connection. If no explicit protocol ('tls' or 'ssl') is configured, a protocol
; based on the configured port is chosen (587 -> tls, 487 -> ssl).
......
......@@ -64,6 +64,9 @@ class Factory implements FactoryInterface
$settings = [
'host' => $config->Mail->host, 'port' => $config->Mail->port
];
if (isset($config->Mail->name)) {
$settings['name'] = $config->Mail->name;
}
if (isset($config->Mail->username) && isset($config->Mail->password)) {
$settings['connection_class'] = 'login';
$settings['connection_config'] = [
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment