- Deleted a template that was accidentally added to the core.

- Made some improvements to the mail subsystems.
This commit is contained in:
JT Smith 2006-07-24 19:15:35 +00:00
parent 3ebd2ef625
commit 1171d11891
5 changed files with 49 additions and 20 deletions

View file

@ -44,7 +44,7 @@ These methods are available from this class:
#-------------------------------------------------------------------
=head2 connect ( sessionh, params )
=head2 connect ( session, params )
Constructor. Opens a connection to a POP3 server.
@ -191,6 +191,7 @@ sub getNextMessage {
subject => $subject,
inReplyTo => $inReplyTo,
messageId => $messageId,
"Return-Path" => $returnPath,
date => $self->session->datetime->mailToEpoch($head->get("Date")),
);
my @segments = ();

View file

@ -209,6 +209,10 @@ A single email address that this message will originate from. Defaults to the co
A single email address that responses to this message will be sent to.
=head4 returnPath
The email address to send bounces to.
=head4 contentType
A mime type for the message. Defaults to "multipart/mixed".
@ -248,7 +252,9 @@ sub create {
unless ($id =~ m/\@/) {
$id .= '@'.$domain;
}
my $returnPath = $headers->{returnPath} || $session->setting->get("mailReturnPath") || $from;
my $message = MIME::Entity->build(
"Return-Path"=>$returnPath,
Type=>$type,
From=>$from,
To=>$headers->{to},
@ -261,8 +267,8 @@ sub create {
Date=>$session->datetime->epochToMail,
"X-Mailer"=>"WebGUI"
);
$message->head->delete("Return-Path");
$message->head->add("Return-Path", "<". ($session->setting->get("mailReturnPath") || $from) . ">");
# $message->head->delete("Return-Path");
# $message->head->add("Return-Path", "<". ($session->setting->get("mailReturnPath") || $from) . ">");
$type = $headers->{contentType};
if ($session->config->get("emailOverride")) {
my $to = $headers->{to};