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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Sending emails automatically when...
Pages: [1]

Author Topic: Sending emails automatically when...  (Read 1246 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Sending emails automatically when...
May 14, 2008, 08:18:24 am
Hi (in full spamming mode ;),

I like the feature to send an email at the end of the registration, and would like to extend it to other actions:

- sending an email when changing the status ("you just been approved")
- sending an email when adding a contact using a profile (to the one that registered)


Am I missing something ? Is this something hackable (through hooks using the template email feature ?)

Any suggestion more than welcome.

X+


-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Sending emails automatically when...
May 27, 2008, 11:36:34 pm
Please check http://civicrm.org/architecture/ to get a better idea of the code.

I suspect u 've to add code for sending receipts in CRM/Event/Form/Participant.php and CRM/Event/Form/Registration.php
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Sending emails automatically when...
May 28, 2008, 08:40:42 am
You might be able to do some (most?) of this using hooks in a small module. For example you can use a post_hook to take action based on evaluating params after a contact is created (your "add contact via profile" case).

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Sending emails automatically when...
May 28, 2008, 08:59:15 am
Code: [Select]
'objectName' can have the following values:

    * 'Individual'
    * 'Household'
    * 'Organization'
    * 'Group'
    * 'GroupContact'
    * 'Relationship'
    * 'Contribution'
    * 'Profile'
          o while this is not really an object, people have expressed an interest to perform an action when a profile is created/edited
    * 'Membership'
    * 'UFMatch'

Am I right if I understand that there isn't any hook on the participant ? Would it be possible to add it easily ?

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: Sending emails automatically when...
May 28, 2008, 11:42:11 am

there is a hook on participant create/edit. we did not add it to the list, can you please update the docs

thanx

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Sending emails automatically when...

This forum was archived on 2017-11-26.