if ($this->body_html) {
$this->_getTokens('html');
+ if (!$this->body_text) {
+ // Since the text template was created from html, use the html tokens.
+ // @see CRM_Mailing_BAO_Mailing::getTemplates()
+ $this->tokens['text'] = $this->tokens['html'];
+ }
}
if ($this->body_text) {
$this->_domain = CRM_Core_BAO_Domain::getDomain();
}
- list($verp, $urls, $headers) = $this->getVerpAndUrlsAndHeaders($job_id,
+ list($verp, $urls, $headers) = $this->getVerpAndUrlsAndHeaders(
+ $job_id,
$event_queue_id,
$hash,
$email,
$isForward
);
+
//set from email who is forwarding it and not original one.
if ($fromEmail) {
unset($headers['From']);
/**
* 'approval_status_id' set in
- * CRM_Mailing_Form_Mailing_Schedule::postProcess() or via API.
+ * CRM_Mailing_Form_Schedule::postProcess() or via API.
*/
if (isset($params['approval_status_id']) && $params['approval_status_id']) {
$job = new CRM_Mailing_BAO_Job();