mirror of
https://github.com/wheelybird/ldap-user-manager.git
synced 2025-01-18 15:32:54 +01:00
add smtp helo host (#220)
This commit is contained in:
parent
7d1897b171
commit
41c5ac3626
@ -182,6 +182,8 @@ To send emails you'll need to use an existing SMTP server. Email sending will b
|
|||||||
|
|
||||||
* `SMTP_HOST_PORT` (default: *25*): The SMTP port on the SMTP server.
|
* `SMTP_HOST_PORT` (default: *25*): The SMTP port on the SMTP server.
|
||||||
|
|
||||||
|
* `SMTP_HELO_HOST` (no default): The hostname to send with the HELO/EHLO command.
|
||||||
|
|
||||||
* `SMTP_USERNAME` (no default): The username to use when the SMTP server requires authentication.
|
* `SMTP_USERNAME` (no default): The username to use when the SMTP server requires authentication.
|
||||||
|
|
||||||
* `SMTP_PASSWORD` (no default): The password to use when the SMTP server requires authentication.
|
* `SMTP_PASSWORD` (no default): The password to use when the SMTP server requires authentication.
|
||||||
|
@ -134,6 +134,7 @@
|
|||||||
$SMTP['user'] = (getenv('SMTP_USERNAME') ? getenv('SMTP_USERNAME') : NULL);
|
$SMTP['user'] = (getenv('SMTP_USERNAME') ? getenv('SMTP_USERNAME') : NULL);
|
||||||
$SMTP['pass'] = (getenv('SMTP_PASSWORD') ? getenv('SMTP_PASSWORD') : NULL);
|
$SMTP['pass'] = (getenv('SMTP_PASSWORD') ? getenv('SMTP_PASSWORD') : NULL);
|
||||||
$SMTP['port'] = (getenv('SMTP_HOST_PORT') ? getenv('SMTP_HOST_PORT') : 25);
|
$SMTP['port'] = (getenv('SMTP_HOST_PORT') ? getenv('SMTP_HOST_PORT') : 25);
|
||||||
|
$SMTP['helo'] = (getenv('SMTP_HELO_HOST') ? getenv('SMTP_HELO_HOST') : NULL);
|
||||||
$SMTP['ssl'] = ((strcasecmp(getenv('SMTP_USE_SSL'),'TRUE') == 0) ? TRUE : FALSE);
|
$SMTP['ssl'] = ((strcasecmp(getenv('SMTP_USE_SSL'),'TRUE') == 0) ? TRUE : FALSE);
|
||||||
$SMTP['tls'] = ((strcasecmp(getenv('SMTP_USE_TLS'),'TRUE') == 0) ? TRUE : FALSE);
|
$SMTP['tls'] = ((strcasecmp(getenv('SMTP_USE_TLS'),'TRUE') == 0) ? TRUE : FALSE);
|
||||||
if ($SMTP['tls'] == TRUE) { $SMTP['ssl'] = FALSE; }
|
if ($SMTP['tls'] == TRUE) { $SMTP['ssl'] = FALSE; }
|
||||||
|
@ -55,6 +55,10 @@ function send_email($recipient_email,$recipient_name,$subject,$body) {
|
|||||||
$mail->Host = $SMTP['host'];
|
$mail->Host = $SMTP['host'];
|
||||||
$mail->Port = $SMTP['port'];
|
$mail->Port = $SMTP['port'];
|
||||||
|
|
||||||
|
if (isset($SMTP['helo'])) {
|
||||||
|
$mail->Helo = $SMTP['helo'];
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($SMTP['user'])) {
|
if (isset($SMTP['user'])) {
|
||||||
$mail->SMTPAuth = true;
|
$mail->SMTPAuth = true;
|
||||||
$mail->Username = $SMTP['user'];
|
$mail->Username = $SMTP['user'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user