Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    521
    Plugin Contributions
    3

    Default Sending multiple emails using zen_mail

    Hi,

    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?

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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Sending multiple emails using zen_mail

    Please explain again the "why" behind your question.
    And what business problem you're trying to solve.
    And why you arrived at this approach as being your "solution".
    And are you trying to send 2 emails "at the same time", ie: a "cc" or "bcc"? or simply re-send the identical email to another recipient?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    521
    Plugin Contributions
    3

    Default Re: Sending multiple emails using zen_mail

    Quote Originally Posted by DrByte View Post
    Please explain again the "why" behind your question.
    And what business problem you're trying to solve.
    And why you arrived at this approach as being your "solution".
    And are you trying to send 2 emails "at the same time", ie: a "cc" or "bcc"? or simply re-send the identical email to another recipient?
    For the SnapAffiliates module currently there is a message sent whenever someone is paid. I want to also have that same email sent to the person who is processing the transactions as well. This message will be sent as a BCC as to protect the privacy of the address of the person sending it.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Sending multiple emails using zen_mail

    Your simplest solution is to copy the existing line (or 2 lines if it's so long that it's split onto multiple lines) for the current call to zen_mail() and paste it again right below the existing one, and simply supply the new email address in place of the customer's email address.
    That way it'll send the normal email to the customer, and then immediately send another identical email to the staff person.
    No bcc configuration required. Just call zen_mail() a second time with a new email address.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v154 My zen_mail sends text-only emails
    By allthingsidLeroy in forum General Questions
    Replies: 7
    Last Post: 19 Oct 2015, 08:09 PM
  2. Replies: 8
    Last Post: 24 Jun 2011, 02:02 PM
  3. Emails from my store are sending multiple times
    By missa425 in forum General Questions
    Replies: 1
    Last Post: 18 Oct 2009, 11:03 PM
  4. Sending emails using SMTPAUTH problem... on my own IIS server
    By Alex Clarke in forum General Questions
    Replies: 3
    Last Post: 25 Mar 2009, 10:19 AM
  5. Sending Multiple Order Confirmation Emails
    By squashrick in forum General Questions
    Replies: 1
    Last Post: 29 Mar 2007, 08:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR