Auto Backup plugin - How to add "cc" mail field

3 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: September 25   (RSS)

Hi Deborah, 

Can you try having both emails on one line and separate them by ; or , such as:

  • user1@host.com; user2@host.com
  • user1@host.com, user2@host.com

Or failing that, you can pass CC explicitly like this: 

// email attachment
sendMessage([
        'from'        => "servermail@domain.com",
        'to'          => "emailone@domain.com",
        'subject'     => "CMS Backup - ABC",
        'text'        => "Automatically generated backup file.",
        'headers'     => [
                'CC'  => 'emailtwo@domain2.com',
        ],
        'attachments' => [
                $filename => $data,
        ],
]);

Hope that helps! Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Hey, Dave.

Your "cc" code works great - either version. Just what I needed!

Thank you.
Deborah