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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Different content for emails and receipts
Pages: [1]

Author Topic: Different content for emails and receipts  (Read 947 times)

j.benit

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 3.4.7
  • CMS version: Drupal 6
  • MySQL version: 5
  • PHP version: 5
Different content for emails and receipts
February 10, 2012, 04:58:52 am
Hi all, i'm having a problem in relation with contributions.

I have set a custom message template for the pdf receipts attached to the emails related to the contributions. The problem is when i receive the email, this template generates the body of the email as well (i mean, it generates the pdf receipt, but the same content of the pdf receipt appears on the email body).

Do you know if there's some possibility of modifying the email body so it hasn't the same content as the receipt?

Thanks a lot for your time.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Different content for emails and receipts
February 10, 2012, 09:15:19 am
Quote from: j.benit on February 10, 2012, 04:58:52 am
I have set a custom message template for the pdf receipts attached to the emails related to the contributions. The problem is when i receive the email, this template generates the body of the email as well (i mean, it generates the pdf receipt, but the same content of the pdf receipt appears on the email body).

It would help to understand the reason for wanting different content in the email than in the PDF, and what content you want in each.

Also, can you explain in more detail your statement ... "I have set a custom message template for pdf receipts" ... Does that mean you've modified the System Workflow message template that is used for online contribution receipts? Or that you've modified the underlying PHP code to use a different User-driven message template that you've created for your site?


Protect your investment in CiviCRM by  becoming a Member!

j.benit

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 3.4.7
  • CMS version: Drupal 6
  • MySQL version: 5
  • PHP version: 5
Re: Different content for emails and receipts
February 10, 2012, 10:09:20 am
Thanks for your quick response Lobo and sorry for the misunderstanding.

The scenario is the following:

-Contributions pages linked to membership types + modification of system workflow message template for memberships
-Setting to attach pdf receipts enabled (civicrm/admin/setting/misc?reset=1)

When someone applies for a membership (using the related contribution page) receives an email. The body of that email contains the same info as the pdf receipt. The question is, is it possible to tweak the contributions email sending workflow to change only the body of the email, for a plain text message for example ?

Thanks for your time and your interest in this question.


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Different content for emails and receipts
February 10, 2012, 12:28:03 pm
You MIGHT be able to do that using the alterMailParams hook (altho checking w/ lobo and he was a bit skeptical on that). Otherwise you'll need to dig into the PHP code and see what changes are needed.

http://wiki.civicrm.org/confluence/display/CRMDOC41/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmalterMailParams

What's the reason for wanting different text in the email body?
Protect your investment in CiviCRM by  becoming a Member!

j.benit

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 3.4.7
  • CMS version: Drupal 6
  • MySQL version: 5
  • PHP version: 5
Re: Different content for emails and receipts
February 11, 2012, 02:55:57 am
Thanks a lot for that, Lobo.

The reason is i consider it more "elegant" from the point of view of the user experience since it is a bit strange to receive replicated content in the email body and inside the attached receipt. I think it is better to have an email body like "thanks for applying for this membership, find your details in the attached pdf..."

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Different content for emails and receipts

This forum was archived on 2017-11-26.