mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
- Added E-Mail Header Precedence:bulk and Auto-submitted: auto-generated
to CI Mail Lib - Sancho Mails are sent now with the new Mail Headers
This commit is contained in:
@@ -66,7 +66,7 @@ function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerIm
|
||||
$body = _parseMailContent('Sancho_Mail_Template', $layout);
|
||||
|
||||
// Send mail
|
||||
$ci->maillib->send('sancho@'. DOMAIN, $to, $subject, $body);
|
||||
$ci->maillib->send('sancho@'. DOMAIN, $to, $subject, $body, $alias = '', $cc = null, $bcc = null, $altMessage = '', $bulk = true, $autogenerated = true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,7 @@ class MailLib
|
||||
* Class constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
{
|
||||
// Set the counter to 0
|
||||
$this->sended = 0;
|
||||
|
||||
@@ -46,7 +46,7 @@ class MailLib
|
||||
/**
|
||||
* Sends a single email
|
||||
*/
|
||||
public function send($from, $to, $subject, $message, $alias = '', $cc = null, $bcc = null, $altMessage = '')
|
||||
public function send($from, $to, $subject, $message, $alias = '', $cc = null, $bcc = null, $altMessage = '', $bulk = false, $autogenerated = false)
|
||||
{
|
||||
// If from is not specified then use the standard one
|
||||
if (is_null($from) || $from == '')
|
||||
@@ -90,6 +90,11 @@ class MailLib
|
||||
$this->ci->email->message($message);
|
||||
if (!isEmptyString($altMessage)) $this->ci->email->set_alt_message($altMessage);
|
||||
|
||||
if($bulk)
|
||||
$this->ci->email->set_header('Precedence', 'bulk');
|
||||
if($autogenerated)
|
||||
$this->ci->email->set_header('Auto-Submitted', 'auto-generated');
|
||||
|
||||
// Avoid printing on standard output ugly error messages
|
||||
$result = @$this->ci->email->send();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user