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

CRM_Utils_Mail::send doesn't allow to override the default replyTo header

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6, 4.7
    • Fix Version/s: 4.7
    • Component/s: CiviMail
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      When sending a mail through the CRM_Utils_Mail::send method, it is not possible to override the empty "replyto" header with an altered "from" value. The default value is the original "from", not the altered one.

      code snippet from CRM_Utils_Mail::send method

      $from = CRM_Utils_Array::value('from', $params);
          if (!$returnPath) {
            $returnPath = self::pluckEmailFromHeader($from);
          }
          $params['returnPath'] = $returnPath;
      
          // first call the mail alter hook
          CRM_Utils_Hook::alterMailParams($params);
          
          ...
          
          // CRM-11295: Omit reply-to headers if empty; this avoids issues with overzealous mailservers
          $replyTo = CRM_Utils_Array::value('replyTo', $params, $from);
      
      

        Attachments

          Activity

            People

            • Assignee:
              jitendra.purohit Jitendra Purohit
              Reporter:
              mollux Mattias Michaux
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: