From fb18363b284b47e28015b1a85d8ba39d036d0800 Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Thu, 25 Jul 2013 15:29:36 -0700 Subject: [PATCH] CRM-13057 ---------------------------------------- * CRM-13057: Replies to mailings processed through SOAP are failing http://issues.civicrm.org/jira/browse/CRM-13057 --- CRM/Mailing/Event/BAO/Reply.php | 8 ++++---- api/v3/Mailing.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CRM/Mailing/Event/BAO/Reply.php b/CRM/Mailing/Event/BAO/Reply.php index eeeda636c3..59034e1baa 100644 --- a/CRM/Mailing/Event/BAO/Reply.php +++ b/CRM/Mailing/Event/BAO/Reply.php @@ -72,8 +72,8 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply { $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}" ); @@ -135,7 +135,7 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply { // 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 @@ -173,7 +173,7 @@ class CRM_Mailing_Event_BAO_Reply extends CRM_Mailing_Event_DAO_Reply { '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}", ); diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index 44a6f6a579..42504f284d 100644 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -162,7 +162,7 @@ function _civicrm_api3_mailing_event_reply_spec(&$params) { $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; } /** -- 2.25.1