$params['X-CiviMail-Bounce']]); } elseif (isset($params['Return-Path'])) { // Copy this header to one that will be returned by Mailgun's webhook. $params['headers']['X-Mailgun-Variables'] = json_encode(['civimail-bounce' => $params['Return-Path']]); } else { // Probably a single email, for which we don't have any useful information to add. } /* * $context = (string [10]) `flexmailer` * $params['X-CiviMail-Mosaico'] = (string [3]) `Yes` * $params['List-Unsubscribe'] = (string [52]) `` * $params['Precedence'] = (string [4]) `bulk` * $params['job_id'] = (string [2]) `72` * $params['From'] = (string [37]) `"Wilma Flintstone" ` * $params['toEmail'] = (string [20]) `barney@example.com` * $params['toName'] = (string [12]) `Barney Rubble` * $params['Return-Path'] = (string [43]) `b.72.32.fa5f74c72c53c77f@crm.example.com` * $params['X-CiviMail-Bounce'] = (string [43]) `b.72.32.fa5f74c72c53c77f@crm.example.com` * $params['attachments'] = (array) */ }