phpMailer

This commit is contained in:
Roland Gruber 2020-03-19 19:33:40 +01:00
parent bf52e55f5f
commit c192886117
3 changed files with 5 additions and 37 deletions

View File

@ -2,7 +2,7 @@
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2009 - 2016 Roland Gruber
Copyright (C) 2009 - 2020 Roland Gruber
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
@ -109,4 +109,6 @@ pre.programlisting {
background-color:#f3f2f1;
}
img {
max-width: 100%;
}

View File

@ -1297,40 +1297,6 @@ function sendPasswordMail($pwd, $user, $recipient = null) {
}
}
/**
* Generates the email header text for the given parameters.
*
* @param String $from FROM address
* @param boolean $isHTML mail is formatted as HTML or plain text
* @param String $replyTo reply-to address (optional)
* @param String $cc CC address
* @param String $bcc BCC address
* @return String header lines
*/
function createEMailHeaders($from, $isHTML, $replyTo = null, $cc = null, $bcc = null) {
$headerLines = "";
if (!empty($from)) {
$headerLines .= 'From: ' . encodeMailAddress($from) . "\r\n";
}
if (!empty($replyTo)) {
$headerLines .= 'Reply-To: ' . encodeMailAddress($replyTo) . "\r\n";
}
if (!empty($cc)) {
$headerLines .= 'Cc: ' . encodeMailAddress($cc) . "\r\n";
}
if (!empty($bcc)) {
$headerLines .= 'Bcc: ' . encodeMailAddress($bcc) . "\r\n";
}
$headerLines .= "MIME-Version: 1.0\r\n";
if ($isHTML) {
$headerLines .= "Content-type: text/html; charset=UTF-8\r\n";
}
else {
$headerLines .= "Content-type: text/plain; charset=UTF-8\r\n";
}
return $headerLines;
}
/**
* Sends out an email.
*

View File

@ -354,7 +354,7 @@ if (isLAMProVersion()) {
// mail settings
$row->add(new htmlSubTitle(_("Password mail settings"), '../../graphics/mailBig.png', null, true), 12);
$pwdMailFrom = new htmlResponsiveInputField(_('From address'), 'pwdResetMail_from', $conf->getLamProMailFrom(), '550');
$pwdMailFrom = new htmlResponsiveInputField(_('From address'), 'pwdResetMail_from', $conf->getLamProMailFrom(), '550', true);
$row->add($pwdMailFrom, 12);
$pwdMailReplyTo = new htmlResponsiveInputField(_('Reply-to address'), 'pwdResetMail_replyTo', $conf->getLamProMailReplyTo(), '554');