Skip to content
Snippets Groups Projects
Commit 7cb5179e authored by Prasad's avatar Prasad
Browse files

Fixes: Mailer error check when server is not configured

parent 3bb050d5
No related branches found
No related tags found
No related merge requests found
......@@ -220,9 +220,10 @@ class Emails_Record_Model extends Vtiger_Record_Model {
$status = $mailer->Send(true);
}
if(!$status) {
$status = $mailer->getError();
//If mailer error, then update emailflag as saved
if($status){
// Before inspecting for mailer error do a explict check on its configuration.
$err = $mailer->_serverConfigured ? $mailer->getError() : vtranslate("LBL_MAIL_SERVER_DESCRIPTION", "Settings:Vtiger");
// If mailer error, then update emailflag as saved
if($err){
$this->updateEmailFlag();
}
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment