summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2013-10-29 13:17:36 +0000
committerfisharebest <fisharebest@gmail.com>2013-10-29 13:17:36 +0000
commitf8b8724dcd9fb401a0a982a6f2c15968b58d4cbb (patch)
tree496ef4de4cc4a70d057c53b7e49b2241f18ef94b /includes
parentfabdf8bac7d77cf284132b9ef0d165bea30373e7 (diff)
downloadwebtrees-f8b8724dcd9fb401a0a982a6f2c15968b58d4cbb.tar.gz
webtrees-f8b8724dcd9fb401a0a982a6f2c15968b58d4cbb.tar.bz2
webtrees-f8b8724dcd9fb401a0a982a6f2c15968b58d4cbb.zip
Add more support for Reply-To: headers on email
Diffstat (limited to 'includes')
-rw-r--r--includes/authentication.php24
1 files changed, 15 insertions, 9 deletions
diff --git a/includes/authentication.php b/includes/authentication.php
index 6adfc32528..0c1e565e1d 100644
--- a/includes/authentication.php
+++ b/includes/authentication.php
@@ -218,7 +218,7 @@ function AddToSearchLog($log_message, $geds) {
// Store a new message in the database
function addMessage($message) {
- global $WEBTREES_EMAIL, $WT_REQUEST;
+ global $WT_REQUEST;
$user_id_from=get_user_id($message['from']);
$user_id_to =get_user_id($message['to']);
@@ -260,12 +260,15 @@ function addMessage($message) {
if (!isset($message['no_from'])) {
// send a copy of the copy message back to the sender
WT_Mail::send(
+ // From:
+ $WT_TREE,
+ // To:
$from,
$fromFullName,
- $WEBTREES_EMAIL,
- $WEBTREES_EMAIL,
- $WEBTREES_EMAIL,
- $WEBTREES_EMAIL,
+ // Reply-To:
+ WT_Site::preference('SMTP_FROM_NAME'),
+ $WT_TREE->preference('title'),
+ // Message
WT_I18N::translate('webtrees Message') . ' - ' . $message['subject'],
$copy_email
);
@@ -311,12 +314,15 @@ function addMessage($message) {
}
if (getUserEmail($user_id_to)) {
WT_Mail::send(
+ // From:
+ $WT_TREE,
+ // To:
getUserEmail($user_id_to),
getUserFullName($user_id_to),
- $WEBTREES_EMAIL,
- $WEBTREES_EMAIL,
- $WEBTREES_EMAIL,
- $WEBTREES_EMAIL,
+ // Reply-To:
+ $from,
+ $fromFullName,
+ // Message
WT_I18N::translate('webtrees Message') . ' - ' . $message['subject'],
$original_email
);