Route all emails through the mailQueue to prevent dropped emails.
This commit is contained in:
parent
f761188bb0
commit
a21783304e
4 changed files with 7 additions and 6 deletions
|
|
@ -288,7 +288,7 @@ WebGUI::Asset::Template->new($self->session,$self->getSetting('accountActivation
|
|||
WebGUI::Macro::process($self->session,\$text);
|
||||
$mail->addText($text);
|
||||
$mail->addFooter;
|
||||
$mail->send;
|
||||
$mail->queue;
|
||||
$self->user->status("Deactivated");
|
||||
$session->var->end($session->var->get("sessionId"));
|
||||
$session->var->start(1,$session->getId);
|
||||
|
|
@ -1086,7 +1086,7 @@ sub emailRecoverPasswordFinish {
|
|||
|
||||
my $mail = WebGUI::Mail::Send->create($session, { to=>$email, subject=>$i18n->get('WebGUI password recovery')});
|
||||
$mail->addText($i18n->get('recover password email text1', 'AuthWebGUI') . $url. ". \n\n".$i18n->get('recover password email text2', 'AuthWebGUI')." \n\n ".$url."?op=auth;method=emailResetPassword;token=$recoveryGuid"."\n\n ". $i18n->get('recover password email text3', 'AuthWebGUI'));
|
||||
$mail->send;
|
||||
$mail->queue;
|
||||
return "<h1>". $i18n->get('recover password banner', 'AuthWebGUI')." </h1> <br> <br> <h3>". $i18n->get('email recover password finish message', 'AuthWebGUI') . "</h3>";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ sub execute {
|
|||
from=>$cs->get("mailAddress")
|
||||
});
|
||||
$send->addText($i18n->get("rejected because no user account"));
|
||||
$send->send;
|
||||
$send->queue;
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
|
@ -232,7 +232,7 @@ sub execute {
|
|||
from=>$cs->get("mailAddress")
|
||||
});
|
||||
$send->addText($i18n->get("rejected because not allowed"));
|
||||
$send->send;
|
||||
$send->queue;
|
||||
}
|
||||
# just in case there are a lot of messages, we should release after a minutes worth of retrieving
|
||||
last if (time() > $start + $ttl);
|
||||
|
|
|
|||
|
|
@ -107,7 +107,8 @@ sub execute {
|
|||
$mail->addText($message);
|
||||
$mail->addFooter;
|
||||
$self->session->user({user=>$previousUser});
|
||||
return $mail->send ? $self->COMPLETE : $self->ERROR;
|
||||
return $mail->queue;
|
||||
return $self->COMPLETE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ sub _notify {
|
|||
|
||||
my $html = sprintf $i18n->get('email message'), $dataHashRef->{count}, $s, $hostname, $hostname;
|
||||
$mail->addHtml($html);
|
||||
$mail->send();
|
||||
$mail->queue();
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue