[DB upgrade] Adding a field to select the mail's body format

Technical reminder about the DB upgrade :
There doesn't seem to be an easy and reusable way to give CMail both
parts of an text+html email, so we rework the database schema to have
a simple 'body' field with a 'body_ishtml' switch, following CMail
interface.

Enhancement from issue #1
This commit is contained in:
Chl 2021-11-27 23:47:52 +01:00
parent 0043e39f30
commit 1e694ef51d
7 changed files with 72 additions and 17 deletions

View file

@ -115,7 +115,8 @@ class Actionssendrecurringinvoicebymail
'errorsTo' => $conf->global->MAIN_MAIL_ERRORS_TO,
'replyTo' => $conf->global->MAIN_MAIL_ERRORS_TO,
'subject' => $mailObject->subject,
'message' => $mailObject->body_plaintext,
'message' => $mailObject->body,
'ishtml' => $mailObject->body_ishtml,
);
// Check that we have a recipient, to avoid some frequent error...
@ -154,7 +155,7 @@ class Actionssendrecurringinvoicebymail
$mail_data['cc'], // CC
$mail_data['bcc'], // BCC
0, //deliveryreceipt
0, //msgishtml
$mail_data['ishtml'], //msgishtml
$mail_data['errorsTo'],
'', // css
'', // trackid