Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14417455
D20055.id47890.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20055.id47890.diff
View Options
diff --git a/src/applications/metamta/adapter/PhabricatorMailMailgunAdapter.php b/src/applications/metamta/adapter/PhabricatorMailMailgunAdapter.php
--- a/src/applications/metamta/adapter/PhabricatorMailMailgunAdapter.php
+++ b/src/applications/metamta/adapter/PhabricatorMailMailgunAdapter.php
@@ -24,6 +24,7 @@
array(
'api-key' => 'string',
'domain' => 'string',
+ 'api-hostname' => 'string',
));
}
@@ -31,12 +32,14 @@
return array(
'api-key' => null,
'domain' => null,
+ 'api-hostname' => 'api.mailgun.net',
);
}
public function sendMessage(PhabricatorMailExternalMessage $message) {
$api_key = $this->getOption('api-key');
$domain = $this->getOption('domain');
+ $api_hostname = $this->getOption('api-hostname');
$params = array();
$subject = $message->getSubject();
@@ -92,7 +95,8 @@
}
$mailgun_uri = urisprintf(
- 'https://api.mailgun.net/v2/%s/messages',
+ 'https://%s/v2/%s/messages',
+ $api_hostname,
$domain);
$future = id(new HTTPSFuture($mailgun_uri, $params))
diff --git a/src/docs/user/configuration/configuring_outbound_email.diviner b/src/docs/user/configuration/configuring_outbound_email.diviner
--- a/src/docs/user/configuration/configuring_outbound_email.diviner
+++ b/src/docs/user/configuration/configuring_outbound_email.diviner
@@ -214,6 +214,9 @@
- `api-key`: Required string. Your Mailgun API key.
- `domain`: Required string. Your Mailgun domain.
+ - `api-hostname`: Optional string. Defaults to "api.mailgun.net". If your
+ account is in another region (like the EU), you may need to specify a
+ different hostname. Consult the Mailgun documentation.
Mailer: Amazon SES
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 1:11 AM (11 h, 39 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6928094
Default Alt Text
D20055.id47890.diff (1 KB)
Attached To
Mode
D20055: Support EU domains for Mailgun API
Attached
Detach File
Event Timeline
Log In to Comment