preparing for 7.3.18 bugfix cycle

fixed rejected cs mail problem
This commit is contained in:
JT Smith 2007-05-14 21:21:09 +00:00
parent 222a0fb33d
commit e388e52f92
5 changed files with 158 additions and 15 deletions

View file

@ -32,7 +32,7 @@ use Apache2::Const -compile => qw(OK DECLINED NOT_FOUND DIR_MAGIC_TYPE);
use Apache2::ServerUtil ();
use LWP::MediaTypes qw(guess_media_type);
our $VERSION = "7.3.17";
our $VERSION = "7.3.18";
our $STATUS = "stable";
#-------------------------------------------------------------------

View file

@ -187,14 +187,22 @@ sub execute {
unless (defined $user) { #if no user
unless ($postGroup eq 1 || $postGroup eq 7) { #reject mail if no registered email, unless post group is Visitors (1) or Everyone (7)
my $send = WebGUI::Mail::Send->create($self->session, {
to=>$message->{from},
inReplyTo=>$message->{messageId},
subject=>$cs->get("mailPrefix").$i18n->get("rejected")." ".$self->{subject},
from=>$cs->get("mailAddress")
});
$send->addText($i18n->get("rejected because no user account"));
$send->send;
if ($message->{from} eq "") {
$self->session->errorHandler->error("For some reason the message ".$message->{subject}." (".$message->{messageId}.") has no from address.");
}
elsif ($message->{from} eq $cs->get("mailAddress")) {
$self->session->errorHandler->error("For some reason the message ".$message->{subject}." (".$message->{messageId}.") has the same from address as the collaboration system's mail address.");
}
else {
my $send = WebGUI::Mail::Send->create($self->session, {
to=>$message->{from},
inReplyTo=>$message->{messageId},
subject=>$cs->get("mailPrefix").$i18n->get("rejected")." ".$self->{subject},
from=>$cs->get("mailAddress")
});
$send->addText($i18n->get("rejected because no user account"));
$send->send;
}
next;
}
$user = WebGUI::User->new($self->session, undef); # instantiate the user as a visitor