converting to new mail queue api
This commit is contained in:
parent
7c71d93c1e
commit
47afbb0138
6 changed files with 13 additions and 13 deletions
|
|
@ -648,9 +648,9 @@ sub sendEmail {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($to =~ /\@/) {
|
if ($to =~ /\@/) {
|
||||||
my $mail = WebGUI::Mail::Send->new($self->session,{to=>$to, subject=>$subject, cc=>$cc, from=>$from, bcc=>$bcc});
|
my $mail = WebGUI::Mail::Send->create($self->session,{to=>$to, subject=>$subject, cc=>$cc, from=>$from, bcc=>$bcc});
|
||||||
$mail->addText($message);
|
$mail->addText($message);
|
||||||
$mail->send;
|
$mail->queue;
|
||||||
} else {
|
} else {
|
||||||
my ($userId) = $self->session->db->quickArray("select userId from users where username=".$self->session->db->quote($to));
|
my ($userId) = $self->session->db->quickArray("select userId from users where username=".$self->session->db->quote($to));
|
||||||
my $groupId;
|
my $groupId;
|
||||||
|
|
@ -662,16 +662,16 @@ sub sendEmail {
|
||||||
$self->session->errorHandler->warn($self->getId.": Unable to send message, no user or group found.");
|
$self->session->errorHandler->warn($self->getId.": Unable to send message, no user or group found.");
|
||||||
} else {
|
} else {
|
||||||
WebGUI::MessageLog::addEntry($userId, $groupId, $subject, $message, "", "", $from);
|
WebGUI::MessageLog::addEntry($userId, $groupId, $subject, $message, "", "", $from);
|
||||||
my $mail = WebGUI::Mail::Send->new($self->session,{to=>$cc, subject=>$subject, from=>$from});
|
my $mail = WebGUI::Mail::Send->create($self->session,{to=>$cc, subject=>$subject, from=>$from});
|
||||||
if ($cc) {
|
if ($cc) {
|
||||||
|
|
||||||
$mail->addText($message);
|
$mail->addText($message);
|
||||||
$mail->send;
|
$mail->queue;
|
||||||
}
|
}
|
||||||
if ($bcc) {
|
if ($bcc) {
|
||||||
WebGUI::Mail::Send->new($self->session, {to=>$bcc, subject=>$subject, from=>$from});
|
WebGUI::Mail::Send->create($self->session, {to=>$bcc, subject=>$subject, from=>$from});
|
||||||
$mail->addText($message);
|
$mail->addText($message);
|
||||||
$mail->send;
|
$mail->queue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -993,9 +993,9 @@ sub www_viewDetail {
|
||||||
if ($self->session->form->process("do") eq "sendEmail") {
|
if ($self->session->form->process("do") eq "sendEmail") {
|
||||||
if ($self->session->form->process("body") ne "") {
|
if ($self->session->form->process("body") ne "") {
|
||||||
my $u = WebGUI::User->new($self->session, $listing->{maintainerId});
|
my $u = WebGUI::User->new($self->session, $listing->{maintainerId});
|
||||||
my $mail = WebGUI::Mail::Send->new($self->session, {to=>$u->profileField("email"),subject=>$listing->{productName}." - ".$self->session->form->process("subject"),from=>$self->session->form->process("from")});
|
my $mail = WebGUI::Mail::Send->create($self->session, {to=>$u->profileField("email"),subject=>$listing->{productName}." - ".$self->session->form->process("subject"),from=>$self->session->form->process("from")});
|
||||||
$mail->addText($self->session->form->process("body"));
|
$mail->addText($self->session->form->process("body"));
|
||||||
$mail->send;
|
$mail->queue;
|
||||||
}
|
}
|
||||||
$var{'email.wasSent'} = 1;
|
$var{'email.wasSent'} = 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,7 @@ sub createAccountSave {
|
||||||
if ($self->session->setting->get("webguiValidateEmail")) {
|
if ($self->session->setting->get("webguiValidateEmail")) {
|
||||||
my $key = $self->session->id->generate();
|
my $key = $self->session->id->generate();
|
||||||
$self->saveParams($self->userId,"WebGUI",{emailValidationKey=>$key});
|
$self->saveParams($self->userId,"WebGUI",{emailValidationKey=>$key});
|
||||||
my $mail = WebGUI::Mail::Send->new($self->session,{
|
my $mail = WebGUI::Mail::Send->create($self->session,{
|
||||||
to=>$profile->{email},
|
to=>$profile->{email},
|
||||||
subject=>$i18n->get('email address validation email subject','AuthWebGUI')
|
subject=>$i18n->get('email address validation email subject','AuthWebGUI')
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -534,9 +534,9 @@ sub www_emailGroupSend {
|
||||||
on a.userId=b.userId and b.fieldName='email' where a.groupId=".$session->db->quote($session->form->process("gid")));
|
on a.userId=b.userId and b.fieldName='email' where a.groupId=".$session->db->quote($session->form->process("gid")));
|
||||||
while (($email) = $sth->array) {
|
while (($email) = $sth->array) {
|
||||||
if ($email ne "") {
|
if ($email ne "") {
|
||||||
my $mail = WebGUI::Mail::Send->new($session, {to=>$email,subject=>$session->form->process("subject"),from=>$session->form->process("from")});
|
my $mail = WebGUI::Mail::Send->create($session, {to=>$email,subject=>$session->form->process("subject"),from=>$session->form->process("from")});
|
||||||
$mail->addHtml($session->form->process("message","HTMLArea"));
|
$mail->addHtml($session->form->process("message","HTMLArea"));
|
||||||
$mail->send;
|
$mail->queue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ sub execute {
|
||||||
$self->session->user({user=>$user});
|
$self->session->user({user=>$user});
|
||||||
my $message = $self->get("message");
|
my $message = $self->get("message");
|
||||||
WebGUI::Macro::process(\$message);
|
WebGUI::Macro::process(\$message);
|
||||||
my $mail = WebGUI::Mail::Send->new($self->session, {
|
my $mail = WebGUI::Mail::Send->create($self->session, {
|
||||||
to=>$self->get("to"),
|
to=>$self->get("to"),
|
||||||
subject=>$self->get("subject")
|
subject=>$self->get("subject")
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ sub execute {
|
||||||
$message .= "UNPROCESSED PAYMENTS:\n-----------------------------\n".join("\n", @unprocessed)."\n\n\n";
|
$message .= "UNPROCESSED PAYMENTS:\n-----------------------------\n".join("\n", @unprocessed)."\n\n\n";
|
||||||
$message .= "FATAL ERRORS:\n-----------------------------\n".join("\n",@fatal)."\n\n\n";
|
$message .= "FATAL ERRORS:\n-----------------------------\n".join("\n",@fatal)."\n\n\n";
|
||||||
$message .= "SUCCESFUL PAYMENTS:\n-----------------------------\n".join("\n", @ok)."\n\n\n";
|
$message .= "SUCCESFUL PAYMENTS:\n-----------------------------\n".join("\n", @ok)."\n\n\n";
|
||||||
my $mail = WebGUI::Mail::Send->new($self->session, {
|
my $mail = WebGUI::Mail::Send->create($self->session, {
|
||||||
to=>$self->session->setting->get("commerceSendDailyReportTo"),
|
to=>$self->session->setting->get("commerceSendDailyReportTo"),
|
||||||
subject=>'Daily recurring payments report'
|
subject=>'Daily recurring payments report'
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue