$mailings = CRM_Mailing_BAO_Mailing::getTableName();
$jobs = CRM_Mailing_BAO_Job::getTableName();
$mailing->query(
- "SELECT * FROM $mailings
- INNER JOIN $jobs
+ "SELECT * FROM $mailings
+ INNER JOIN $jobs
ON $jobs.mailing_id = $mailings.id
WHERE $jobs.id = {$q->job_id}"
);
// CRM-5567: we need to set Reply-To: so that any response
// to the forward goes to the sender of the reply
- $parsed->setHeader('Reply-To', $replyto instanceof ezcMailAddress ? $parsed->from->__toString() : $replyto);
+ $parsed->setHeader('Reply-To', $replyto instanceof ezcMailAddress ? $replyto : $parsed->from->__toString());
// $h must be an array, so we can't use generateHeaders()'s result,
// but we have to regenerate the headers because we changed To
'Subject' => "Re: {$mailing->subject}",
'To' => $mailing->replyto_email,
'From' => $from,
- 'Reply-To' => empty($replyto) ? $dao->email : $replyto,
+ 'Reply-To' => empty($replyto) ? $eq->email : $replyto,
'Return-Path' => "do-not-reply@{$emailDomain}",
);
$params['job_id']['api.required'] = 1;
$params['event_queue_id']['api.required'] = 1;
$params['hash']['api.required'] = 1;
- $params['replyTo']['api.required'] = 1;
+ $params['replyTo']['api.required'] = 0;
}
/**