Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13948

Hook alter mail params needs more info (id)

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.3
    • Fix Version/s: 4.4.4
    • Component/s: None
    • Labels:
      None

      Description

      Trying to use the hookAlterMailParams & I have no way of identifying which reminder it relates to

      the only data I have is

      (
      [groupName] => Scheduled Reminder Sender
      [from] => me <test@EXAMPLEr.ORG>
      [toName] => Jerome Bachman
      [toEmail] => jeromeb@notmail.co.in
      [subject] => jjj
      [text] => kk
      [html] => <p>kk</p>

      [returnPath] => test@EXAMPLEr.ORG
      )

      It seems extra params could be added pretty easily and they would be passed straight through ie.

      // set up the parameters for CRM_Utils_Mail::send
      $mailParams = array(
      'groupName' => 'Scheduled Reminder Sender',
      'from' => $from,
      'toName' => $contact['display_name'],
      'toEmail' => $email,
      'subject' => $messageSubject,
      );

      could also have

      $mailParams['entity'] = 'action_schedule';
      $mailParams['entity_id'] = 2;

      I note Activity::sendMessage relates to an activity entity - so this would work ok here.

      We could also add something like entity_params = array() - anything particular to this calling of the hook - but I don't have a specific usage for that if we add the entity & entity id

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: