Support » Plugin: SpeakUp! Email Petitions » [Plugin: SpeakUp! Email Petitions] CC and BCC option?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Kreg Wallace

    (@kreg)

    I’m not planning to add this, but if you want to try adding it yourself, open up /includes/class.mail.php and add the CC or BCC values onto the $headers variable in the send_petition() function.

    A guide on how to compose the headers can be found here.

    Thread Starter aslanj

    (@aslanj)

    Thank you so much, Kreg, for your quick reply. I will try and add it, and just in case anyone would like to do so, as well, I’ll post the code here.

    I have another question, but I’ll create a new topic so that I don’t mess the support forum up.

    Thanks again!

    I’ve checked the code (/includes/class.mail.php) for adding a CC and BCC option, but it’s a bit over my head.

    Is it easier to just change the default mode to use BCC (rather than customization options)? Could you provide me with the specific code to make this change?

    Thanks so much, this is a great plugin!

    Plugin Author Kreg Wallace

    (@kreg)

    I haven’t actually tried this, so it’s untested but to BCC yourself on the emails you would just need to add the BCC info to the email headers. In class.mail.php the headers for the confirmation email are set on line 38. To add a BCC header, you would add a new line there so that this:

    $headers = "From: " . $options['confirm_email'] . "\r\n";

    is changed to this:

    $headers = "From: " . $options['confirm_email'] . "\r\n";
    $headers .= 'Bcc: myname@domain.com' . "\r\n";

    of course you’ll need to change myname@domain.com to your own email address. If you want to CC instead of BCC, then just replace the Bcc in the code above with Cc.

    A similar operation to line 75 would get you BCC’d on the petition message emails.

    Kreg,

    Thanks for the quick reply!

    I actually need something a little simpler… I need the default “target email” to be set to “BCC:” all addresses by default rather than the “TO:” default setup of all addresses being visible to the recipients.

    Can you give me a tip on how to make this change?

    Kreg,

    I’m hoping you can respond to my latest message… I made a donation 🙂

    I actually need something a little simpler… I need the default “target email” to be set as “BCC:” all addresses by default rather than the “TO:” default setup of all addresses being visible to the recipients.

    Thanks!

    Ok, I found out an imperfect solution.

    I added a BCC header and inserted my list of emails into the PHP code there.

    I had to leave a target email in order for it to save. Ideally, it could be set to use BCC without a target email (TO:), but this solution works.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: SpeakUp! Email Petitions] CC and BCC option?’ is closed to new replies.