Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Characters in Mail, RSS/XML Auto Mailer


Covall99

Recommended Posts

Hello, ive installed rss in my shop, works fine, dealt with the characters.

Now i have problems with contribution xml/rss auto mailer.

In that u type rss url and the script sends emails with new products to users. Everything ok but ive problems with characters.

Charset im using is iso-8859-2, its in the mail header. Osc original mailer works fine so i think problem is in the xml/rss auto mailer script, file - newsletter_auto.php

thats the fragment sending mail which causes problems-

// IMPORTANT***********************************************************************
**********
// Uncomment this section after testing 
$sql = 'SELECT `customers_firstname` , `customers_lastname` , `customers_email_address` '
	. ' FROM `customers` '
	. ' WHERE `customers_newsletter` = 1';
$result = mysql_query($sql)or die (mysql_error());

while ($row = mysql_fetch_array($result)) {
$name = $row['customers_firstname'] .' '. $row['customers_lastname'];
$email = $row['customers_email_address'];

// IMPORTANT***********************************************************************
**********
// To test change $email to '[email protected]'
newsletter_mail($name, '[email protected], $subject, $GLOBALS['email_body'], $from, $from_email);
// ********************************************************************************
**********

// IMPORTANT***********************************************************************
**********
// Uncomment this section after testing 
}

// Function to send out the newsletters
 function newsletter_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {
if (SEND_EMAILS != 'true') return false;

// Instantiate a new mail object
$message = new email(array('X-Mailer: SeekShopping Mailer'));

// Build the text version
$text = ($email_text);
if (EMAIL_USE_HTML == 'true') {
  $message->add_html($email_text, $text);
} else {
  $message->add_html($email_text, $text);
}

// Send message
$message->build_message();
$message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, '[email protected] ');
}

mysql_close($linkid);

 

is there any way to hard code $message to iso-8859-2. i heard of iconv function. Any suggestions? Thanks

ps. in oscommerce original mailer is funtion htmlspecialchars etc- because of that osc mails are ok?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...