Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending order confirmation emails to different addresses..

Status
Not open for further replies.

canajun

Programmer
Sep 28, 2002
57
CA
I am trying to send the "extra" order confirmation emails to different addresses, based on suburb.. Here is what I have tried, but get errors..

$regionalquery = "Select suburb_email from suburb where suburb_name = '" .$order->customer['suburb'] . "'";
$regionalemail = tep_db_query ($regionalquery)or die("Query failed");

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

$email_order = $order->customer['firstname'] . ' ' . $order->customer['lastname'] . "\n" . 'Telephone: ' . $order->customer['telephone'] . "\n" . 'Region:' . $order->customer['suburb'] . "\n" . $order->customer['email_address'] . "\n\n" . 'Print Invoice: ' . "<A HREF='" . tep_href_link(FILENAME_INVOICE_PRINT, 'oID=' . $insert_id, 'SSL', false) . "'>" . tep_href_link(FILENAME_INVOICE_PRINT, 'oID=' . $insert_id, 'SSL', false) . "</a>\n\n" . 'Administration Link: ' . "<A HREF='" . tep_href_link(FILENAME_ADMIN_LINK) . "'>" . tep_href_link(FILENAME_ADMIN_LINK) . "</a>\n\n" . $email_order;



tep_mail('', $regionalemail, 'NEW - ' . EMAIL_TEXT_SUBJECT . ' #' . $insert_id, $email_order, STORE_OWNER, $regionalemail);

}

and here is the error I get:

Warning: mail() expects parameter 1 to be string, resource given in /home/mysite/public_html/catalog/includes/classes/email.php on line 502

Any help would be appreciated.
 
You havn't got a first paramant?
tep_mail(",... <- the its emtry before the ,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top