diff --git a/lib/WebGUI/Mail/Send.pm b/lib/WebGUI/Mail/Send.pm index 634748ff9..66ded968b 100644 --- a/lib/WebGUI/Mail/Send.pm +++ b/lib/WebGUI/Mail/Send.pm @@ -213,6 +213,8 @@ sub create { } } } + my $returnPath = $session->setting->get("mailReturnPath"); + $returnPath = "<".$returnPath.">" if $returnPath; my $message = MIME::Entity->build( Type=>$headers->{contentType} || "multipart/mixed", From=>$headers->{from} || $session->setting->get("companyEmail"), @@ -221,6 +223,7 @@ sub create { Bcc=>$headers->{bcc}, "Reply-To"=>$headers->{replyTo}, "In-Reply-To"=>$headers->{inReplyTo}, + "Return-Path"=>$returnPath, Subject=>$headers->{subject}, "Message-Id"=>$headers->{messageId} || "WebGUI-".$session->id->generate, Date=>$session->datetime->epochToHuman("","%W, %d %C %y %j:%n:%s %O"), diff --git a/lib/WebGUI/Operation/Settings.pm b/lib/WebGUI/Operation/Settings.pm index cd18ac513..7600ac107 100644 --- a/lib/WebGUI/Operation/Settings.pm +++ b/lib/WebGUI/Operation/Settings.pm @@ -180,6 +180,13 @@ sub www_editSettings { -hoverHelp=>$i18n->get('824 description'), -value=>$session->setting->get("mailFooter") ); + $tabform->getTab("messaging")->textarea( + -name=>"mailReturnPath", + -label=>$i18n->get("mail return path"), + -hoverHelp=>$i18n->get('mail return path help'), + -value=>$session->setting->get("mailReturnPath") + ); +# misc $tabform->getTab("misc")->yesNo( -name=>"preventProxyCache", -label=>$i18n->get(400), diff --git a/lib/WebGUI/i18n/English/WebGUI.pm b/lib/WebGUI/i18n/English/WebGUI.pm index 56fefd6d7..ad4a12f67 100644 --- a/lib/WebGUI/i18n/English/WebGUI.pm +++ b/lib/WebGUI/i18n/English/WebGUI.pm @@ -1,6 +1,18 @@ package WebGUI::i18n::English::WebGUI; our $I18N = { + 'mail return path help' => { + message => q|To what email address should undeliverable messages be sent?|, + lastUpdated => 0, + context=>"Settings hover help" + }, + + 'mail return path' => { + message => q|Return Path|, + lastUpdated => 0, + context=>"Settings" + }, + 'default version tag workflow help' => { message => q|Which workflow should be used by default when user's create their own version tags.|, lastUpdated => 0,