add_text($message); $mimemessage->build_message(); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', $from, $subject); } tep_redirect(tep_href_link(FILENAME_MAIL, 'mail_sent_to=' . urlencode($mail_sent_to))); } if ( ($action == 'preview') && !isset($HTTP_POST_VARS['customers_email_address']) ) { $messageStack->add(ERROR_NO_CUSTOMER_SELECTED, 'error'); } if (isset($HTTP_GET_VARS['mail_sent_to'])) { $messageStack->add(sprintf(NOTICE_EMAIL_SENT_TO, $HTTP_GET_VARS['mail_sent_to']), 'success'); } ?> > <?php echo TITLE; ?>




' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . ' ' . tep_image_submit('button_send_mail.gif', IMAGE_SEND_EMAIL); ?>
'', 'text' => TEXT_SELECT_CUSTOMER); $customers[] = array('id' => '***', 'text' => TEXT_ALL_CUSTOMERS); $customers[] = array('id' => '**D', 'text' => TEXT_NEWSLETTER_CUSTOMERS); $mail_query = tep_db_query("select customers_email_address, customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " order by customers_lastname"); while($customers_values = tep_db_fetch_array($mail_query)) { $customers[] = array('id' => $customers_values['customers_email_address'], 'text' => $customers_values['customers_lastname'] . ', ' . $customers_values['customers_firstname'] . ' (' . $customers_values['customers_email_address'] . ')'); } ?>