Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customers emails


osmember

Recommended Posts

Posted

Hi everyone.

I have come across an intersting contribution that allows us to export all the emails of the customers subsribed into newsletters. I have installed it it is working fine, but i wished if it could export all the customers emails stored in the datwbase even those UNSubscribed ones.

I guess there is a small modification should be made in these lines:

$filename="addresses.txt";  //.txt is good for import into excel workbook as tab delimited file

// end of configuration!
require('includes/application_top.php');  // gives us SOME security anyway
require_once('includes/configure.php');  // gives us osC database info

header('Content-Type: text/x-csv');
header('Content-Disposition: attachment; filename="' . $filename . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');

if ( mysql_connect ( DB_SERVER , DB_SERVER_USERNAME , DB_SERVER_PASSWORD )) { 
$sql   = "SELECT  customers_firstname, customers_lastname, customers_email_address "; 
$sql .= "FROM customers WHERE customers_newsletter = '1'"; 
$result = mysql_db_query ( DB_DATABASE , $sql );
echo "email\tFirst Name\tLast Name\n";
while ( $row = mysql_fetch_array($result)) {
	if ($row[customers_email_address]) {
		echo "$row[customers_email_address]\t$row[customers_firstname]\t$row[customers_lastname]\n";
	}

} 
} 
mysql_close (); 
?>

 

Please tell me what to edit..

 

Best regards and thanks

:)

Posted

It's another story, I have many customers haven't paid yet by paypal, the status is still Preparing IPN, I would like to send to all of them an email informing them that there is another payment option have beeb added, but because too many i cannot send to them one by one, so i prefer to search the emails exported to EXCEL and then send a batch email to all of them once.

Posted
It's another story, I have many customers haven't paid yet by paypal, the status is still Preparing IPN, I would like to send to all of them an email informing them that there is another payment option have beeb added, but because too many i cannot send to them one by one, so i prefer to search the emails exported to EXCEL and then send a batch email to all of them once.

First, you need to check if the money has been paid into your paypal account. The status (to the best of my knowledge) will not change until you change the status in admim.

 

Second, you do not want to be seen as spamming your customers.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...