forked from extern/egroupware
added ability to designate Sender: field
This commit is contained in:
parent
3c93f4f0e2
commit
7eff94a52d
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user