Forums

PHP

This topic is locked

smart mailer 1.0.5 php

Posted 26 Oct 2008 03:26:12
1
has voted
26 Oct 2008 03:26:12 lucas charles posted:
trying to send multiple emails out from a recordset. does this actually work anymore? have tried about every setting that i can think of. here is the test code i have.

<?php

mysql_select_db($database_someone, $someone);
$query_test_rs = "SELECT admin_name, admin_email FROM site_admin ORDER BY admin_id ASC";
$test_rs = mysql_query($query_test_rs, $someone) or die(mysql_error());
$row_test_rs = mysql_fetch_assoc($test_rs);
$totalRows_test_rs = mysql_num_rows($test_rs);

// Smart Mailer 1.0.5
// Send on load
@set_time_limit(300);
$sm1 = new SmartMailer();
$sm1->checkVersion("1.05";
$sm1->smtpSetup("", "", "", "";
$sm1->component = "Sendmail";
$sm1->tmpFolder = "";
$sm1->embedImages = false;
$sm1->progressBar = "";
$sm1->ignore_errors = true;
$sm1->setFrom("someone", " ";
//$sm1->toRecord = test_rs;
//$sm1->toRecordName = "admin_firstname";
//$sm1->toRecordEmail = "admin_email";
$sm1->total_mail = $totalRows_test_rs;
do {
$sm1->reset();
$sm1->setSubject("this is a subject test";
// using static for body
$sm1->setBody_Static_text("this is a content test";
// Attachments none
$sm1->sendMail("multiple";
} while ($row_test_rs = mysql_fetch_assoc($test_rs));
$sm1->done();
?>

why is this commented out?
//$sm1->toRecord = test_rs;
//$sm1->toRecordName = "admin_firstname";
//$sm1->toRecordEmail = "admin_email";

Reply to this topic