@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix Mailgun Reply-To handling

Summary:
When sending the "Reply-To" header to Mailgun, Phabricator would
previously send two headers for every "Reply-To": "Reply-To[0][email]" and
"Reply-To[0][name]". Instead, explicitly build the header as specified by RFC
2822 and send it to Mailgun pre-baked.

Pretty sure this bug was a cargo-cult from the Sendgrid code, where (apparently)
this actually works.

Test Plan:
Triggered an email from Phabricator, saw that the header was sent
properly.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D8645

authored by

Carl Jackson and committed by
epriestley
213eea7b cca5078d

+2 -5
+2 -5
src/applications/metamta/adapter/PhabricatorMailImplementationMailgunAdapter.php
··· 18 18 if (empty($this->params['reply-to'])) { 19 19 $this->params['reply-to'] = array(); 20 20 } 21 - $this->params['reply-to'][] = array( 22 - 'email' => $email, 23 - 'name' => $name, 24 - ); 21 + $this->params['reply-to'][] = "{$name} <{$email}>"; 25 22 return $this; 26 23 } 27 24 ··· 92 89 93 90 if (idx($this->params, 'reply-to')) { 94 91 $replyto = $this->params['reply-to']; 95 - $params['h:reply-to'] = $replyto; 92 + $params['h:reply-to'] = implode(', ', $replyto); 96 93 } 97 94 98 95 if (idx($this->params, 'ccs')) {