Skip to content
Snippets Groups Projects
Commit 6033b093 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

FIX: A constructor must not return a value.

FIX: A topic is required to send an email (probability to be spam of
99%)
parent 0bf0937c
Branches
Tags
No related merge requests found
...@@ -134,6 +134,13 @@ class CMailFile ...@@ -134,6 +134,13 @@ class CMailFile
dol_syslog("CMailFile::CMailfile: MAIN_MAIL_SENDMODE=".$conf->global->MAIN_MAIL_SENDMODE." charset=".$conf->file->character_set_client." from=$from, to=$to, addr_cc=$addr_cc, addr_bcc=$addr_bcc, errors_to=$errors_to, trackid=$trackid", LOG_DEBUG); dol_syslog("CMailFile::CMailfile: MAIN_MAIL_SENDMODE=".$conf->global->MAIN_MAIL_SENDMODE." charset=".$conf->file->character_set_client." from=$from, to=$to, addr_cc=$addr_cc, addr_bcc=$addr_bcc, errors_to=$errors_to, trackid=$trackid", LOG_DEBUG);
dol_syslog("CMailFile::CMailfile: subject=$subject, deliveryreceipt=$deliveryreceipt, msgishtml=$msgishtml", LOG_DEBUG); dol_syslog("CMailFile::CMailfile: subject=$subject, deliveryreceipt=$deliveryreceipt, msgishtml=$msgishtml", LOG_DEBUG);
if (empty($subject))
{
dol_syslog("CMailFile::CMailfile: Try to send an email with empty subject");
$this->error='ErrorSubjectIsRequired';
return;
}
// Detect if message is HTML (use fast method) // Detect if message is HTML (use fast method)
if ($msgishtml == -1) if ($msgishtml == -1)
{ {
...@@ -436,8 +443,7 @@ class CMailFile ...@@ -436,8 +443,7 @@ class CMailFile
{ {
// Send mail method not correctly defined // Send mail method not correctly defined
// -------------------------------------- // --------------------------------------
$this->error = 'Bad value for MAIN_MAIL_SENDMODE constant';
return 'Bad value for MAIN_MAIL_SENDMODE constant';
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment