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 CiviReport (Moderator: Dave Greenberg) »
  • CiviReportMail: tokenized subject line?
Pages: [1]

Author Topic: CiviReportMail: tokenized subject line?  (Read 1069 times)

dbsavage

  • Guest
CiviReportMail: tokenized subject line?
January 26, 2010, 10:22:07 am
Hi,

I'm wondering if there's some way to generate the subject line of a report email sent via CiviReportMail.php dynamically. Specifically, I'm trying to send a custom daily contribution report, and would like to be able to include the current day's date in the email subject. I'm assuming this would involve hacking CiviReportMail.php, but if there's another way, I'd love to hear about it. I'd also appreciate advice as to how I would go about altering the CiviReportMail script to accomplish this, since it wasn't obvious to me when I tried looking at the code.

Thanks!

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: CiviReportMail: tokenized subject line?
January 26, 2010, 10:37:27 am

u can hack the code here:

CRM/Report/Utils/Report.php, function mailReport

Code: [Select]
        $params['subject'    ] = CRM_Utils_Array::value( 'email_subject', $instanceInfo );

would be good to allow folks to add "tokens" to the subject line so that date/time can be added.

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 CiviReport (Moderator: Dave Greenberg) »
  • CiviReportMail: tokenized subject line?

This forum was archived on 2017-11-26.