My riddle site sends out an email daily containing a riddle from my database. Well actually it doesn't.... I use www.ymlp.com to send the emails. It works great but it's not automated and honestly sometimes I forget to send them So I need a simple script.. no admin panel or anything needed... that can do timed mailing starting at midnight and send to a large mailing list. The list is small right now. Only high xxx emails. But I need a script that can support up to at most 5k emails. I'll probably move to something else if it gets bigger than that. Oh and it needs to be able to support both HTML and non-HTML emails I can code the email capturing and random riddle selection I just need a class that can actually send the emails. Anyone got something like this lying around they'd part with for $50 bucks or so?
Here is a mailer class that I've used a few times: http://xpertmailer.sourceforge.net/ It works really well. What you should do is write a script to gather your email address, then send the mail with the class mentioned above. You could execute this script once a day using a cronjob. (just about the only way to execute a script automatically at a given time). PM me for more info, I might be able to help you out...
How does xpertmailer handle looping through the emails? I just want to give it my array with the emails in it and a variable containing the email message for the day (both the HTML version and the plain text version).
OK xpertmailer looks pretty decent. Maybe I could just slap a foreach loop around the send function $mail = new SMTP; $mail->Delivery('relay'); $mail->Relay('relay-hostname.net', 'username', 'password', 465, 'autodetect', 'tls'); $mail->TimeOut(10); $mail->Priority('high'); $mail->From('username@relay-hostname.net', 'my name'); $mail->AddTo('client@destination.com', 'user name'); $mail->Text('Text version of the message'); $mail->Html('<font color="red"><b><u>HTML version of the message</u></b></font><br><br><i>Powered by</i> <img src="photo.gif">'); $sent = $mail->Send('And were off!');
You could possibly try something like this: <? //Variables needed: //$EmailArray an array of email address, I'm assuming email address as key and user name as the value //$Send Number (below) thats how many emails to send at once. //Be sure to include your path to xpertmailer include("path to xpert mailer"); //Create the initial mail object $mail = new SMTP; $mail->Delivery('relay'); $mail->Relay('relay-hostname.net', 'username', 'password', 465, 'autodetect', 'tls'); $mail->TimeOut(10); $mail->Priority('high'); $mail->From('username@relay-hostname.net', 'my name'); $mail->Text('Text version of the message'); $mail->Html('<font color="red"><b><u>HTML version of the message</u></b></font><br><br><i>Powered by</i> <img src="photo.gif">'); $SendNumber = 100; //Number of Emails to send at once $c = 1; foreach($EmailArray as $Email => $UserName) //Loop thru email array { $mail->AddTo($Email, $UserName); //Add email address to the mail object if($c++ % $SendNumber == 0) { $sent = $mail->Send('And were off'); //replace 'and were off' with the message subject //lets recreate the mail object to delete the previous add to, unless you have found a different way $mail = new SMTP; $mail->Delivery('relay'); $mail->Relay('relay-hostname.net', 'username', 'password', 465, 'autodetect', 'tls'); $mail->TimeOut(10); $mail->Priority('high'); $mail->From('username@relay-hostname.net', 'my name'); $mail->Text('Text version of the message'); $mail->Html('<font color="red"><b><u>HTML version of the message</u></b></font><br><br><i>Powered by</i> <img src="photo.gif">'); } } if(count($EmailArray) % $SendNumber != 0) { //if the count of emails isnt exactly divisible by 100, there will be more emails left, send them $sent = $mail->Send('And were off!'); //replace 'and were off' with the message subject } ?> PHP: