Originally I found this which only vaguely pointed me in the right direction, so I thought I'd create a gist of what ended up working for me.
To add a CC address, you have to two two things
- Add the address to your recipeints array, and set the
header_tovalue to an address in thetofield. So if you're sending the email toto_address@domain.comand CCing it tocc_address@domain.com, theheader_toforcc_address@domain.comwill need to be set toto_address@domain.com - Add the email to the
CCheadersoption incontentobject. If you have multiple emails, these should be comma separated.