View Single Post
  #1  
Old 11-26-2003, 03:01 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default Newsletter Bug Fix / Mod

This is really a bug fix with a mod.

The newsletter sends out the text mail templates regardless if you select it to send as a html email.

Thats the bug .... now the mod bit

The ability to send a newsletter with a header AS WELL as a signature.

add a template called newsletter_header.tpl in /skin1/mail/html/ and put whatever header you want in it ... your signature bit (footer) is in /skin1/mail/html/newsletter_signature.tpl update that as well, to match your design.

now for the code change ... in /xcart/admin/newsletter_modify.php

change
Code:
$signature = $smarty->fetch("mail/newsletter_signature.tpl");
to
Code:
$header = $smarty->fetch("mail/html/newsletter_header.tpl"); $signature = $smarty->fetch("mail/html/newsletter_signature.tpl");


If you use the internal PHP mailer .. change the following ...
Code:
func_send_simple_mail($value, $subject, $body."\n\n".preg_replace("/$email_spec/", "$value", $signature), $config["Company"]["newsletter_email"]);
to
Code:
func_send_simple_mail($value, $subject, $header."\n\n".$body."\n\n".preg_replace("/$email_spec/", "$value", $signature), $config["Company"]["newsletter_email"]);


If you don't use the internal PHP mailer .. change the following
Code:
func_write_array($body_file,$body."\n\n".$signature);
to
Code:
func_write_array($body_file,$header."\n\n".$body."\n\n".$signature);

I recommend you change all the file regardless of which system you use.
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
Reply With Quote