mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
- Added new template for plain text email
- Renamed template for html email mail.php -> mailHTML.php - Changed method getMessageByToken of Recipient_model for getting only the last message by token - Changed method getMessages of Recipient_model for getting event the token - Changed method send of library MailLib to add the possibility to send an alternative plain text body for a html mail - Changed library MessageLib to add the possibility to send emails in html/text format to inform the users about new messages - Added method toHTML to controller Messages - Added new configuration entries in message.php - Added new view messageHTML.php
This commit is contained in:
@@ -45,7 +45,7 @@ class MailLib
|
||||
/**
|
||||
* Sends a single email
|
||||
*/
|
||||
public function send($from, $to, $subject, $message, $alias = "", $cc = null, $bcc = null)
|
||||
public function send($from, $to, $subject, $message, $alias = "", $cc = null, $bcc = null, $altMessage = '')
|
||||
{
|
||||
// If from is not specified then use the standard one
|
||||
if (is_null($from) || $from == "")
|
||||
@@ -59,6 +59,7 @@ class MailLib
|
||||
if (!is_null($bcc)) $this->ci->email->bcc($bcc);
|
||||
$this->ci->email->subject($subject);
|
||||
$this->ci->email->message($message);
|
||||
if (!empty($altMessage)) $this->ci->email->set_alt_message($altMessage);
|
||||
|
||||
// Avoid printing on standard output ugly error messages
|
||||
$result = @$this->ci->email->send();
|
||||
|
||||
Reference in New Issue
Block a user