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, All.

I tried adding the "cc" mail field option to the Auto Backup plugin and am not receiving the cc mail.

I simply added the "cc" line shown here, but perhaps I'm oversimplifying?

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

Tested with 1.05 Beta and 1.04. Just wondering if it can be done - would be nice, but not critical.

Thanks for any ideas!
Deborah

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