From 7eff94a52d754bdf38ca83d866510c1589652ea8 Mon Sep 17 00:00:00 2001 From: skeeter Date: Thu, 15 Mar 2001 05:35:30 +0000 Subject: [PATCH] added ability to designate Sender: field --- phpgwapi/inc/class.send.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.send.inc.php b/phpgwapi/inc/class.send.inc.php index 330d942248..ba31be5ce8 100644 --- a/phpgwapi/inc/class.send.inc.php +++ b/phpgwapi/inc/class.send.inc.php @@ -37,14 +37,18 @@ class send { $this->err["desc"] = " "; } - function msg($service, $to, $subject, $body, $msgtype="", $cc="", $bcc="", $from ="") { + function msg($service, $to, $subject, $body, $msgtype="", $cc="", $bcc="", $from="", $sender='') { global $phpgw_info, $phpgw, $attach_sig; if ($from ==""){ $from = $phpgw_info["user"]["fullname"]." <".$phpgw_info["user"]["preferences"]["email"]["address"].">"; } + if ($sender ==""){ $sender = $phpgw_info["user"]["fullname"]." <".$phpgw_info["user"]["preferences"]["email"]["address"].">"; } if ($service == "email") { $now = getdate(); $header = "Date: " . gmdate("D, d M Y H:i:s") . " +0000\n"; $header .= "From: ".$from."\n"; + if($from != $sender) { + $header .= "Sender: ".$sender."\n"; + } $header .= "Reply-To: ".$phpgw_info["user"]["preferences"]["email"]["address"]."\n"; $header .= "To: $to\n"; if (!empty($cc)) {