- Deleted a template that was accidentally added to the core.
- Made some improvements to the mail subsystems.
This commit is contained in:
parent
3ebd2ef625
commit
1171d11891
5 changed files with 49 additions and 20 deletions
|
|
@ -21,6 +21,8 @@
|
|||
doesn't work.
|
||||
- Fixed a cross-Matrix linking problem when you have two or more Matricies on
|
||||
one site with the same category names.
|
||||
- Deleted a template that was accidentally added to the core.
|
||||
- Made some improvements to the mail subsystems.
|
||||
- fix: Revised WebGUI::HTML::filter "all" so that text does not run together when
|
||||
tags are removed. Added additional tests to HTML.t. (Eric Kennedy)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,20 +18,22 @@ my $toVersion = "7.0.3"; # make this match what version you're going to
|
|||
my $quiet; # this line required
|
||||
|
||||
|
||||
sleep(1); # to prevent duplicate timestamps
|
||||
sleep(1); # todd prevent duplicate timestamps
|
||||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
deleteTemplate();
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
##-------------------------------------------------
|
||||
#sub exampleFunction {
|
||||
# my $session = shift;
|
||||
# print "\tWe're doing some stuff here that you should know about.\n" unless ($quiet);
|
||||
# # and here's our code
|
||||
#}
|
||||
#-------------------------------------------------
|
||||
sub deleteTemplate {
|
||||
print "\tDeleting a template that was accidentally added.\n" unless ($quiet);
|
||||
my $template = WebGUI::Asset->newByDynamicClass($session, "wCIc38CvNHUK7aY92Ww4SQ");
|
||||
if (defined $template) {
|
||||
$template->purge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -638,10 +638,16 @@ sub notifySubscribers {
|
|||
my $message = $self->processTemplate($var, $cs->get("notificationTemplateId"));
|
||||
my $unsubscribe = '<p><a href="'.$siteurl.$cs->getUnsubscribeUrl.'">'.$i18n->get("unsubscribe","Asset_Collaboration").'</a></p>';
|
||||
my $user = WebGUI::User->new($self->session, $self->get("ownerUserId"));
|
||||
my $from = $user->profileField("email") || $cs->get("mailAddress");
|
||||
my $replyTo = $cs->get("mailAddress");
|
||||
my $setting = $self->session->setting;
|
||||
my $listId = $cs->get("mailAddress");
|
||||
my $returnAddress = $setting->get("mailReturnPath");
|
||||
my $companyAddress = $setting->get("companyEmail");
|
||||
my $listAddress = $cs->get("mailAddress");
|
||||
my $posterAddress = $user->profileField("email");
|
||||
my $from = $posterAddress || $listAddress || $companyAddress;
|
||||
my $replyTo = $listAddress || $returnAddress || $companyAddress;
|
||||
my $sender = $listAddress || $companyAddress || $posterAddress;
|
||||
my $returnPath = $returnAddress || $sender;
|
||||
my $listId = $sender;
|
||||
$listId =~ s/\@/\./;
|
||||
my $domain = $cs->get("mailAddress");
|
||||
$domain =~ s/.*\@(.*)/$1/;
|
||||
|
|
@ -653,6 +659,7 @@ sub notifySubscribers {
|
|||
my $subject = $cs->get("mailPrefix").$self->get("title");
|
||||
my $mail = WebGUI::Mail::Send->create($self->session, {
|
||||
from=>"<".$from.">",
|
||||
returnPath => "<".$returnPath.">",
|
||||
replyTo=>"<".$replyTo.">",
|
||||
toGroup=>$cs->get("subscriptionGroupId"),
|
||||
subject=>$subject,
|
||||
|
|
@ -663,11 +670,16 @@ sub notifySubscribers {
|
|||
$mail->addHeaderField("References", "<".$replyId.">");
|
||||
}
|
||||
$mail->addHeaderField("List-ID", $cs->getTitle." <".$listId.">");
|
||||
$mail->addHeaderField("List-Help", "<mailto:".$setting->get("companyEmail").">, <".$setting->get("companyURL").">");
|
||||
$mail->addHeaderField("List-Help", "<mailto:".$companyAddress.">, <".$setting->get("companyURL").">");
|
||||
$mail->addHeaderField("List-Unsubscribe", "<".$siteurl.$cs->getUnsubscribeUrl.">");
|
||||
$mail->addHeaderField("List-Subscribe", "<".$siteurl.$cs->getSubscribeUrl.">");
|
||||
$mail->addHeaderField("List-Owner", "<mailto:".$setting->get("companyEmail").">, <".$setting->get("companyURL")."> (".$setting->get("companyName").")");
|
||||
$mail->addHeaderField("List-Post", "<mailto:".$cs->get("mailAddress").">");
|
||||
$mail->addHeaderField("List-Owner", "<mailto:".$companyAddress.">, <".$setting->get("companyURL")."> (".$setting->get("companyName").")");
|
||||
$mail->addHeaderField("Sender", "<".$sender.">");
|
||||
if ($listAddress eq "") {
|
||||
$mail->addHeaderField("List-Post", "No");
|
||||
} else {
|
||||
$mail->addHeaderField("List-Post", "<mailto:".$listAddress.">");
|
||||
}
|
||||
$mail->addHeaderField("List-Archive", "<".$siteurl.$cs->getUrl.">");
|
||||
$mail->addHeaderField("X-Unsubscribe-Web", "<".$siteurl.$cs->getUnsubscribeUrl.">");
|
||||
$mail->addHeaderField("X-Subscribe-Web", "<".$siteurl.$cs->getSubscribeUrl.">");
|
||||
|
|
@ -677,6 +689,7 @@ sub notifySubscribers {
|
|||
$mail->queue;
|
||||
my $mail = WebGUI::Mail::Send->create($self->session, {
|
||||
from=>"<".$from.">",
|
||||
returnPath => "<".$returnPath.">",
|
||||
replyTo=>"<".$replyTo.">",
|
||||
toGroup=>$thread->get("subscriptionGroupId"),
|
||||
subject=>$subject,
|
||||
|
|
@ -688,11 +701,16 @@ sub notifySubscribers {
|
|||
$mail->addHeaderField("References", "<".$replyId.">");
|
||||
}
|
||||
$mail->addHeaderField("List-ID", $cs->getTitle." <".$listId.">");
|
||||
$mail->addHeaderField("List-Help", "<mailto:".$setting->get("companyEmail").">, <".$setting->get("companyURL").">");
|
||||
$mail->addHeaderField("List-Help", "<mailto:".$companyAddress.">, <".$setting->get("companyURL").">");
|
||||
$mail->addHeaderField("List-Unsubscribe", "<".$siteurl.$thread->getUnsubscribeUrl.">");
|
||||
$mail->addHeaderField("List-Subscribe", "<".$siteurl.$thread->getSubscribeUrl.">");
|
||||
$mail->addHeaderField("List-Owner", "<mailto:".$setting->get("companyEmail").">, <".$setting->get("companyURL")."> (".$setting->get("companyName").")");
|
||||
$mail->addHeaderField("List-Post", "<mailto:".$cs->get("mailAddress").">");
|
||||
$mail->addHeaderField("List-Owner", "<mailto:".$companyAddress.">, <".$setting->get("companyURL")."> (".$setting->get("companyName").")");
|
||||
if ($listAddress eq "") {
|
||||
$mail->addHeaderField("List-Post", "No");
|
||||
} else {
|
||||
$mail->addHeaderField("List-Post", "<mailto:".$listAddress.">");
|
||||
}
|
||||
$mail->addHeaderField("Sender", "<".$sender.">");
|
||||
$mail->addHeaderField("List-Archive", "<".$siteurl.$cs->getUrl.">");
|
||||
$mail->addHeaderField("X-Unsubscribe-Web", "<".$siteurl.$thread->getUnsubscribeUrl.">");
|
||||
$mail->addHeaderField("X-Subscribe-Web", "<".$siteurl.$thread->getSubscribeUrl.">");
|
||||
|
|
|
|||
|
|
@ -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 = ();
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue