mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-17 12:09:28 +00:00
Set from, cc and bcc as param in sendSanchoMail
This commit is contained in:
@@ -34,9 +34,11 @@ const DEFAULT_SANCHO_FOOTER_IMG = 'sancho_footer_DEFAULT.jpg';
|
||||
* @param string $to Email-adress.
|
||||
* @param string $subject Subject of mail.
|
||||
* @param string $headerImg Filename of the specific Sancho header image.
|
||||
* @param string $cc Sets CC of mail.
|
||||
* @param string $bcc Sets BCC of mail.
|
||||
* @return void
|
||||
*/
|
||||
function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG, $footerImg = DEFAULT_SANCHO_FOOTER_IMG)
|
||||
function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG, $footerImg = DEFAULT_SANCHO_FOOTER_IMG, $from = null, $cc = null, $bcc = null)
|
||||
{
|
||||
$ci =& get_instance();
|
||||
$ci->load->library('email');
|
||||
@@ -45,6 +47,11 @@ function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerIm
|
||||
$sanchoHeader_img = 'skin/images/sancho/'. $headerImg;
|
||||
$sanchoFooter_img = 'skin/images/sancho/'. $footerImg;
|
||||
|
||||
if ($from == '')
|
||||
{
|
||||
$from = 'sancho@'.DOMAIN;
|
||||
}
|
||||
|
||||
// Embed sancho header and footer image
|
||||
// reset important to ensure embedding of images when called in a loop
|
||||
$ci->email->clear(true); // clear vars and attachments
|
||||
@@ -67,7 +74,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, $alias = '', $cc = null, $bcc = null, $altMessage = '', $bulk = true, $autogenerated = true);
|
||||
$ci->maillib->send($from, $to, $subject, $body, $alias = '', $cc = null, $bcc = null, $altMessage = '', $bulk = true, $autogenerated = true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user