#!/usr/bin/php
Here is your weekly list of new Pilot\'s comming on in the next 14 days

'; // Pull out the rows while($row = mysql_fetch_array( $result )) { // Print out the contents of each row $text .= $row['title'] . " - " . $row['subtitle'] . " - " . $row['usedate'] . " - " . $row['channel'] . " - " . $row['description']."\n"; $html .= ""; } $html .= "
TitleSubtitleDateChannelDescriptioni
" . $row['title']."" . $row['subtitle']."" . $row['usedate'] . "" . $row['channel'] . "" . $row['description']."
"; // Create Headers and such $mime = new Mail_mime(); $hdrs = array( 'From' => 'Sender@domain.com', 'Subject' => 'New Pilots for the next 14 days', ); $mime->setTXTBody($text); $mime->setHTMLBody($html); $body = $mime->get(); $hdrs = $mime->headers($hdrs); /* Create the mail object using the Mail::factory method */ $mail_object =& Mail::factory("smtp", $smtpinfo); /* Ok send mail */ $mail_object->send('your_email@domain.com', $hdrs, $body); ?>