Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newsletter with 40,000+ subscribers.


V0ltage

Recommended Posts

Our customer base that wishes to receive newsletters is over 40,000. The builtin oscommerce Newsletter module doesn't quite support a list of this size, and simply times out or chokes the web server when it gets a ways through sending. What I wanted to know is what you guys out there who also have large lists use to send out newsletter emails? We would like to do multipart mime messages with both html and text versions in the same message. Any suggestions??

Link to comment
Share on other sites

Hi,

 

Our customer base that wishes to receive newsletters is over 40,000. The builtin oscommerce Newsletter module doesn't quite support a list of this size, and simply times out or chokes the web server when it gets a ways through sending. What I wanted to know is what you guys out there who also have large lists use to send out newsletter emails? We would like to do multipart mime messages with both html and text versions in the same message. Any suggestions??

 

Have done a bit of wrok writing scripts to do HTML plus text emails, but nowhere near sending out that volume (Are you sure it is newsletters, and not spam ?? ).

 

Anyway, the basic principle I had to apply in both Perl and PHP was to add a sleep command, just for 2 or 3 seconds, after sending each email, this enables the MTA to 'close' properly.

 

HTH,

 

Peter

Link to comment
Share on other sites

Do you have code that you could post for this? I might see about just utilizing the oscommerce email.php class in much the same fashion. And no, these are customers who have purchased from us who have checked to receive the newsletter (unchecked by default). 40k+ is a lot I know, hence my issues with the subject, but not spam by any means.

Link to comment
Share on other sites

Do you have code that you could post for this? I might see about just utilizing the oscommerce email.php class in much the same fashion. And no, these are customers who have purchased from us who have checked to receive the newsletter (unchecked by default). 40k+ is a lot I know, hence my issues with the subject, but not spam by any means.

 

 

if you want so send out 40000 + newsletters, please make sure I am not one of the recipients. That sound like spam if ever I saw one.

Treasurer MFC

Link to comment
Share on other sites

if you want so send out 40000 + newsletters, please make sure I am not one of the recipients. That sound like spam if ever I saw one.

 

I wouldn't jump to that conclusion that quick.

 

We have a 2 month old OsC site and have over 10k people who have signed up and requested newsletter.

 

We use @once for sending our emails, but that's mostly because we've been using them for years now with our main web site - we're just throwing our OsC site emails into the system since that relationship is already setup.

 

Have you looked at extracting your subscriber list and using Bulk Mail processing software to send that many emails out?

Link to comment
Share on other sites

Our customer base that wishes to receive newsletters is over 40,000. The builtin oscommerce Newsletter module doesn't quite support a list of this size, and simply times out or chokes the web server when it gets a ways through sending. What I wanted to know is what you guys out there who also have large lists use to send out newsletter emails? We would like to do multipart mime messages with both html and text versions in the same message. Any suggestions??

 

Christ! What is the URL of your website? I would like to see what kind of site that is only two months old generates 10K+ users requesting a newsletter to be sent to them! I think a lot more people would be less apt to jump to the conclusion that you are a spammer if we knew the URL to your website and could see the content. I mean your CARD link shows everything as private which doesn't look too good ...

 

If it's daily free porn pics ... sign me up. :D

Link to comment
Share on other sites

Wow!

Do you guys give away gold bars with your newsletters or what?

 

I found that even with a few hundred subscribers it was more professional to use a standalone application and extract the mailing list. I used 1-2-3 all (I think it was called). It seems to have a lot of features for the price though it has one or two bugs in the version I use.

Link to comment
Share on other sites

Christ!  What is the URL of your website?  I would like to see what kind of site that is only two months old generates 10K+ users requesting a newsletter to be sent to them!  I think a lot more people would be less apt to jump to the conclusion that you are a spammer if we knew the URL to your website and could see the content.  I mean your CARD link shows everything as private which doesn't look too good ...

 

If it's daily free porn pics ... sign me up.  :D

 

I'm not the original poster, but our site is http://www.joanndesigns.com

 

To stay on topic and along with my post on being 2 months old and 10k subscribers, we've sent at least one email to over a million customers from our regular web site, so we're used to sending mass emails to big numbers.

Link to comment
Share on other sites

Hi,

 

Do you have code that you could post for this?

 

I don't know if you want to use the address_book table or the customers, so I'm assuming customers, schema dump as follows:

 

CREATE TABLE `customers` (

  `customers_id` int(11) NOT NULL auto_increment,

  `customers_gender` char(1) NOT NULL default '',

  `customers_firstname` varchar(32) NOT NULL default '',

  `customers_lastname` varchar(32) NOT NULL default '',

  `customers_dob` datetime NOT NULL default '0000-00-00 00:00:00',

  `customers_email_address` varchar(96) NOT NULL default '',

  `customers_default_address_id` int(11) NOT NULL default '0',

  `customers_telephone` varchar(32) NOT NULL default '',

  `customers_fax` varchar(32) default NULL,

  `customers_password` varchar(40) NOT NULL default '',

  `customers_newsletter` char(1) default NULL,

  PRIMARY KEY  (`customers_id`)

) TYPE=MyISAM AUTO_INCREMENT=7 ;

 

Now, the code I did is not from an osCommerce site, so please excuse any mistakes I make as I try and 'guess' what you want/need in the newsletter, and 'translate' things across. :)

 

Because you wanted multi-part, I have left the code in that does that, so you can see how it is done. We have a flag that indicates if they want plain text or HTML, if they want HTML, we make it multi-part and send plain text as well. Hope that sense.

 

The code is completely untested, as I had to change a lot of lines, especially variables used, so no guarantees it will work. The best way to test is change the sql qry up the top to only get (say) your 'customers_id' number. :D

 

Here it is, all the formatting and code indentation is lost in the post, so it doesn't look very 'pretty'. :(

 

<?php

//Put your db cnnections here, and of course add 'application_top.php'

$from = "[email protected]";
$fromname = "Voltage";
$subject = "Newsletter - December 2004";

$query = "SELECT customers_firstname, customers_lastname, customers_email_address from customers WHERE customers_newsletter='1')";
$result = mysql_query($query) or die("MySQL Error. (my profil)".mysql_error());

while ($row = mysql_fetch_array($result)) {

$customers_firstname = $row["customers_firstname"];
$customers_lastname = $row["customers_lastname"];
$customers_email_address = $row["customers_email_address"];
$email_format_html = $row["email_format_html"];  //This is not in osCommerce, just for example purposes
$multipart = md5(uniqid(microtime()));

$headers = BuildHeaders($email_format_html,$multipart);
$message = ComposeMessage($email_format_html,$customers_firstname,$fromname,$multipart);

$to =  '"' . $customers_firstname . ' ' . $customers_lastname . '"' . ' <' . $customers_email_address . '>';
$sent = mail( $to, $subject, $message, $headers);

if ($sent) {
 sleep(2);	// give the MTA time to close properly before next email is sent
}

}

//////////////////////
function BuildHeaders($email_format_html,$multipart) {

global $from, $fromname;

$headers  = "From: \"".addslashes($fromname)."\" <".$from.">\r\n";
$headers .= "Reply-To: \"".addslashes($fromname)."\" <".$from.">\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "X-Mailer: Voltage Email System\r\n";

if ($email_format_html) {
 $headers .= "Content-type: multipart/alternative; boundary=\"Part-{$multipart}\"";
} else {
 $headers .= "Content-type: text/plain; charset=US-ASCII\r\n";
 $headers .= "Content-transfer-encoding: 7BIT";
}

return $headers;
}

///////////////////////
function ComposeMessage($email_format_html,$customers_firstname,$fromname,$multipart) {

if ($email_format_html) {
 $message  = "This is a multi-part message in MIME format.\n\n";
 $message .= "--Part-" . $multipart . "\n";
 $message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
 $message .= "Content-Transfer-Encoding: quoted-printable\n";
 $message .= ComposeTextMessage($customers_firstname,$fromname) . "\n";
 $message .= "--Part-" . $multipart . "\n";
 $message .= 'Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
<div>Dear <b>' . $customers_firstname . '</b><br><br>
<p>We have many products heavily discounted for the December festive season, 
so please visit <a href="http://www.example.com">our website</a> to view all these great products, at heavily discounted prices</p><br>
<p>Add some more words, ... add a few images, the sky is the limit with what you can put in your html newsletter</p><br>
</div>
</body>
</html>';

} else {

 $message = ComposeTextMessage($customers_firstname,$fromname);
}
return $message;
}

////////////////////////////////
function ComposeTextMessage($customers_firstname,$fromname) {

$message = "Dear " . $customers_firstname . ",\r\n";
$message .= "\r\n" . "We have many products heavily discounted for the December festive season, 
  	 so please visit our website at http://www.example.com , to view all these great products, at heavily discounted prices.";

return $message;
}
////////////////////

?>

 

Peter

Link to comment
Share on other sites

Thanks for the code you supplied Peterr, I've not had a chance to work with it yet, but will keep the list informed as to the success. As for the folks questioning the "spamminess" of the messages sent out, I would like to state in defense that every one of these 40,000+ addresses *IS* a user that requested to receive the list. Here's the last newsletter that just went out for those who are skeptical.. http://www.thepartyworks.com/newsletter-12-22-04.html with the address to the site being http://www.thepartyworks.com (duh! <G>) And I don't remember saying ever that the site has only been up for 2 months, more like a year since I've taken over as webmaster. <shrug> :)

 

Thanks again for your input guys. What I've done to bandaid things up so far is to create another "newsletter_recipients" table that simply has 2 email addresses listed, and modified the newsletter module to gets the list of email addresses from this new table. When you send an email to the list address, it sends a copy of the newsletter to everyone on the list through the Mailman mailing list software. I've tweaked it so that it can only be posted to by one user from one ip address. So I've got the huge list of emails plugged into the mailman userlist, and oscommerce just thinks its sending email to one user. I've got the oscommerce mailer tweaked too so that it allows you send a test out to 'admins only' which I defined as a flag that can be toggled on the customer details screen from the admin page to let them see 'test newsletters' before it's mailed out to thousands of people. Not entirely practical to be considered a plausible solution to the problem as a hole, but definately works well for "special" scenarios like this.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...