@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.

Support EU domains for Mailgun API

Summary:
See <https://discourse.phabricator-community.org/t/mailgun-eu-zone-not-working/2332/4>.

Mailgun has a couple of API domains depending on where your account is based.

Test Plan:
- Sent normal mail successfully with my non-EU account.
- Waiting on user confirmation that this works in the EU.

Reviewers: amckinley

Reviewed By: amckinley

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

+8 -1
+5 -1
src/applications/metamta/adapter/PhabricatorMailMailgunAdapter.php
··· 24 24 array( 25 25 'api-key' => 'string', 26 26 'domain' => 'string', 27 + 'api-hostname' => 'string', 27 28 )); 28 29 } 29 30 ··· 31 32 return array( 32 33 'api-key' => null, 33 34 'domain' => null, 35 + 'api-hostname' => 'api.mailgun.net', 34 36 ); 35 37 } 36 38 37 39 public function sendMessage(PhabricatorMailExternalMessage $message) { 38 40 $api_key = $this->getOption('api-key'); 39 41 $domain = $this->getOption('domain'); 42 + $api_hostname = $this->getOption('api-hostname'); 40 43 $params = array(); 41 44 42 45 $subject = $message->getSubject(); ··· 92 95 } 93 96 94 97 $mailgun_uri = urisprintf( 95 - 'https://api.mailgun.net/v2/%s/messages', 98 + 'https://%s/v2/%s/messages', 99 + $api_hostname, 96 100 $domain); 97 101 98 102 $future = id(new HTTPSFuture($mailgun_uri, $params))
+3
src/docs/user/configuration/configuring_outbound_email.diviner
··· 227 227 228 228 - `api-key`: Required string. Your Mailgun API key. 229 229 - `domain`: Required string. Your Mailgun domain. 230 + - `api-hostname`: Optional string. Defaults to "api.mailgun.net". If your 231 + account is in another region (like the EU), you may need to specify a 232 + different hostname. Consult the Mailgun documentation. 230 233 231 234 232 235 Mailer: Amazon SES