View Single Post
  #1  
Old 07-03-2003, 06:58 AM
  finestshops's Avatar 
finestshops finestshops is online now
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Default Easy fix for sending HTML newsletters but other in plain txt

> Can we send html newsletter in HTML and all other email
> notifications in plain text?

Here is the fix from x-cart support:

Please look at the "General settings" page. If the option 'Use internal PHP mailer for sending newsletters.' is turned OFF, you can try the following modification:

Edit the 'admin/spam.sh' file and replace the line

Code:
(echo "To: $target"; echo "From: $mail_from"; echo "Subject: $mail_subj"; echo; cat $mail_body) | $sendmail_prog $target

with

Code:
(echo "To: $target"; echo "From: $mail_from"; echo "Content-type: text/html"; echo "Subject: $mail_subj"; echo; cat $mail_body) | $sendmail_prog $target

Otherwise, you should modify the 'func_send_simple_mail' function in the 'include/func.php' file. Please rplace the lines

Code:
if ($config["Email"]["html_mail"] == "Y") $headers .= "Content-Type: text/html; charset: ".$charset.$lend; else $headers .= "Content-Type: text/plain; charset: ".$charset.$lend;

with

Code:
if ($config["Email"]["html_mail"] == "Y" || true) $headers .= "Content-Type: text/html; charset: ".$charset.$lend; else $headers .= "Content-Type: text/plain; charset: ".$charset.$lend;

-----------
Modifying 'admin/spam.sh' works fine for me.
This way you do not have to put
in all email templates
just to send html newsletter.

Enjoy,
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
Reply With Quote