Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    help question How do I use the zen_mail function with additional CC: (carbon copied) email address

    I am interested in having the zen_mail function also send an e-mail to a CC:'d address. The solution I'm looking for must be specifically using the CC function of the mailer, not an array of consecutive emails sent out one after the other, nor as a BCC e-mail!

    Outside of Zen Cart, I know this works:

    $headers .= 'Cc: [email protected]' . "\r\n";
    Last edited by Donn; 25 Oct 2013 at 12:20 AM. Reason: clarification

  2. #2
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: How do I use the zen_mail function with additional CC: (carbon copied) email addr

    Using something like

    ...

    zen_mail ($send_to_name, $send_to_email

    ...

    Setting $send_to_email to "email1(at)aol(dot)com, email2(at)aol(dot)com" seems to send out the email to both addresses, but not with CC!

  3. #3
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: How do I use the zen_mail function with additional CC: (carbon copied) email addr

    There's a setting for this in the admin, but I don't think it does an actual CC.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  4. #4
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: How do I use the zen_mail function with additional CC: (carbon copied) email addr

    Quote Originally Posted by afo View Post
    There's a setting for this in the admin, but I don't think it does an actual CC.
    Really? I've never stumbled upon it yet. Even if it's not precisely what I need for this, later it may be useful knowing where that is. Please let me know!

    I found the file that does the email functions called functions_email.php.

    At line 224: $mail->Subject = $email_subject;
    225:$mail->From = $from_email_address;
    226: $mail->FromName = $from_email_name;
    227: $mail->AddAddress($to_email_address, $to_name);
    228: //$mail->AddAddress($to_email_address); // (alternate format if no name, since name is optional)
    229: //$mail->AddBCC(STORE_OWNER_EMAIL_ADDRESS, STORE_NAME);

    What about uncommenting line 229?

    Or could I just change it to:
    $mail->AddCC(STORE_OWNER_EMAIL_ADDRESS, STORE_NAME);

    ??

  5. #5
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: How do I use the zen_mail function with additional CC: (carbon copied) email addr

    Uncommenting line 229 above seems to send a copy to the store's email address.

    When I changed it to :$mail->AddCC(STORE_OWNER_EMAIL_ADDRESS, STORE_NAME);

    I do not think it works.
    Last edited by Donn; 25 Oct 2013 at 04:33 PM.

  6. #6
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: How do I use the zen_mail function with additional CC: (carbon copied) email addr

    You don't say what emails you want to CC, but in Admin - Configuration - Email Settings you can add more recipients to most of the standard Zencart emails. As afo said, I don't know if it'll show up as a CC.

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

    Default Re: How do I use the zen_mail function with additional CC: (carbon copied) email addr

    Adding $mail->AddCC() will add specific headers to cc specific recipients.
    This requires manual coding on a case-by-case basis.
    You probably don't want all your customers seeing cc's to all kinds of other people on the emails sent to them about their personal private purchases!
    .

    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. How to use the widht / height with the zen_image function
    By mesnitu in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 12 Dec 2015, 12:43 PM
  2. How do I send an attachment with zen_mail()? v1.3.8
    By jenbullfrog in forum General Questions
    Replies: 18
    Last Post: 16 Jun 2011, 10:14 AM
  3. how to use zen_mail 's attachments ?
    By greenlight in forum General Questions
    Replies: 0
    Last Post: 13 May 2009, 11:40 AM
  4. Can I remove the need for customer password? and use number instead of email address?
    By xlserret in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Jun 2008, 03:27 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