Include additional email configuration fields

`email.user` can be set if the sending address is not your SMTP username
all mail is being sent in plaintext SMTP unless `email.ssl` is set to true
This commit is contained in:
celestora 2022-04-16 19:39:42 +03:00 committed by GitHub
parent b8fcf3d8e9
commit 46bb7bf0db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,8 +28,8 @@ class Email
CHANDLER_ROOT_CONF["email"]["postmark"]["stream"] CHANDLER_ROOT_CONF["email"]["postmark"]["stream"]
); );
} else { } else {
$transport = new Swift_SmtpTransport(CHANDLER_ROOT_CONF["email"]["host"], CHANDLER_ROOT_CONF["email"]["port"], "ssl"); $transport = new Swift_SmtpTransport(CHANDLER_ROOT_CONF["email"]["host"], CHANDLER_ROOT_CONF["email"]["port"], CHANDLER_ROOT_CONF["email"]["ssl"] ? "ssl" : NULL);
$transport->setUsername(CHANDLER_ROOT_CONF["email"]["addr"]); $transport->setUsername(CHANDLER_ROOT_CONF["email"]["user"] ?? CHANDLER_ROOT_CONF["email"]["addr"]);
$transport->setPassword(CHANDLER_ROOT_CONF["email"]["pass"]); $transport->setPassword(CHANDLER_ROOT_CONF["email"]["pass"]);
$message = new Swift_Message($subject); $message = new Swift_Message($subject);