Paul Williams
Paul Williams

Reputation: 1598

How to send multiple messages in Zen-Cart using zen_mail?

I'm trying to invoke zen_mail twice so that I can send an email to myself (admin) and my customer. I'm using the following to invoke it but I cannot seem to get it to work. When I do call it, it causes the emails not to send out. Can anyone help?

  zen_mail($customer['customers_firstname'] . " " . $customer['customers_lastname'],
       $admin,
       $subject,
       $text,
       TITLE,
       $admin['admin_email'],
       $block,
       $module_used
       );  

Upvotes: 0

Views: 625

Answers (2)

Scott Fleming
Scott Fleming

Reputation: 451

In the ZENCART admin:

Configuration->Email Options: Send Copy of Order Confirmation Emails To:

Here you can place multiple email addresses: ME,Joe,Fred

This will send confirmation emails to ME, Joe and Fred in addition to your customer.

Upvotes: 0

Scott C Wilson
Scott C Wilson

Reputation: 20026

You can send messages to multiple recipients using zen_mail but the syntax is screwy. Why not just call zen_mail twice - once for the customer and once for the admin. This is the technique that is used in

includes/classes/orders.php

you can search for zen_mail in this file and find the calls.

Upvotes: 1

Related Questions