CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • CiviEvent Suggestions (Moderator: Michał Mach) »
  • Emails copy
Pages: [1]

Author Topic: Emails copy  (Read 2012 times)

ollea

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.25
  • MySQL version: 5.5.22
  • PHP version: 5.3.10
Emails copy
January 22, 2013, 05:18:21 am
Hello,

Perhaps it is possible but I did not find how.

I would like to know if it is possible to send a BCC copy of emails to a predefined e-mail address.

For example we would like to send a BCC copy to our accountant when a new participant is subscribed to an event.

Could you help me ?

Thank you for the support,

Tony Horrocks

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 7
    • Fabriko Limited
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7
Re: Emails copy
January 22, 2013, 05:46:34 am
Yes.What you need to to is create a CiviCRM profile and attach in to your event registration page. In the  profile Advanced settings there is a field called "Notify when profile form is submitted?". You can add one or more addresses to this field.
Hope this helps.
Tony Horrocks
Author of the CiviCRM CookBook https://www.packtpub.com/web-development/civicrm-cookbook

ollea

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.25
  • MySQL version: 5.5.22
  • PHP version: 5.3.10
Re: Emails copy
January 25, 2013, 02:43:28 am
Thank you but we would like to send a copy when adding a subscription from the backend :

/civicrm/participant/add?reset=1&action=add&context=standalone

Is there a way to do it ?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Emails copy
January 25, 2013, 10:03:52 am

You could potentially do this via the mail alter hook

http://wiki.civicrm.org/confluence/display/CRMDOC42/Hook+Reference#HookReference-hook_civicrm_alterMailParams

There is not an option in the UI for this :(

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ollea

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.25
  • MySQL version: 5.5.22
  • PHP version: 5.3.10
Re: Emails copy
February 07, 2013, 08:54:12 am
Thank you, it works but there is a little problem.

I have created a new module and added this function inside it :

Code: [Select]
function callhooks_civicrm_alterMailParams(&$params)
{
$params['bcc'] = 'my@email.com';
}

When an e-mail is sent it is now blind copied to the specified e-mail but this address is also added to the recipients (To:), like : user@user.com, my@email.com

Do you have an idea why and how not to add the address to the recipients ?

Additionally could you tell me how to identify in my hook function the e-mail that is sent when adding somebody to an event to the other e-mails ?

Thank you,

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Emails copy
February 07, 2013, 09:47:45 am

1. the bcc bug is a bug in the underlying PEAR library and is not likely to be fixed till we switch to using a different mail library

2. You should print the $params array and see the contents. I suspect there are a couple of variables in there which indicate what email message template is being sent

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ollea

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.25
  • MySQL version: 5.5.22
  • PHP version: 5.3.10
Re: Emails copy
February 08, 2013, 01:28:57 am
Thank you, I identify it using these two variables :

Code: [Select]
if ( $params['groupName'] === 'msg_tpl_workflow_event' && $params['valueName'] === 'event_offline_receipt' )
As I understand, there is no way to send blind e-mail in CiviCRM yet, right ?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • CiviEvent Suggestions (Moderator: Michał Mach) »
  • Emails copy

This forum was archived on 2017-11-26.