Variables in Email Subject

I’m testing the Events module with an Email Template, but only variables from ‘Events’ are displaying in the subject line.

If I put a variable from Contacts or Accounts in the Subject its comes up blank, the same variables work in the body of the email, is this a restriction? Is there a way around it?

Hi Govind,

This seems to be a known issue, from some time ago, in SugarCRM CE.

There is a fix, which has been mentioned here.

I would look into whether this can be applied in an upgrade-safe manner before making the change.

Thanks,

Will.

Hi Will

Thanks for your reply, I checked the Email.php and the line referred to in the link you provided is in the file, this is the block of code
$mail->Subject = $this->name;
$mail = $this->handleBody($mail);
$mail->Subject = $this->name;
$this->description_html = from_html($this->description_html);

Just to be clear, its not that is isn’t adding any values, its seems to only be adding values from the Events module.

This is the line in the template
You have been invited to $fp_events_name – $contact_last_name ($fp_events_event_type_c)

This is the subject in the actual email message
You have been invited to Test3 – (Round Table)

‘Test3’ = $fp_events_name
‘Round Table’ = $fp_events_event_type_c

$contact_last_name is blank in the Subject line, but works in the message body, it makes no sense why it would skip the value in the subject.

Is there a different Email.php that the Event module uses?