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

Add `amazon-ses.endpoint` configuration

Summary: Fixes T5116.

Test Plan: Will test in production.

Reviewers: chad

Maniphest Tasks: T5116

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

+28 -1
+13
src/applications/config/check/PhabricatorMailSetupCheck.php
··· 64 64 ->addPhabricatorConfig('amazon-ses.secret-key'); 65 65 } 66 66 67 + if (!PhabricatorEnv::getEnvConfig('amazon-ses.endpoint')) { 68 + $message = pht( 69 + 'Amazon SES is selected as the mail adapter, but no SES endpoint '. 70 + 'is configured. Provide an SES endpoint or choose a different '. 71 + 'mail adapter.'); 72 + 73 + $this->newIssue('config.amazon-ses.endpoint') 74 + ->setName(pht('Amazon SES Endpoint Not Set')) 75 + ->setMessage($message) 76 + ->addRelatedPhabricatorConfig('metamta.mail-adapter') 77 + ->addPhabricatorConfig('amazon-ses.endpoint'); 78 + } 79 + 67 80 $address_key = 'metamta.default-address'; 68 81 $options = PhabricatorApplicationConfigOptions::loadAllOptions(); 69 82 $default = $options[$address_key]->getDefault();
+12
src/applications/config/option/PhabricatorAWSConfigOptions.php
··· 27 27 $this->newOption('amazon-ses.secret-key', 'string', null) 28 28 ->setHidden(true) 29 29 ->setDescription(pht('Secret key for Amazon SES.')), 30 + $this->newOption('amazon-ses.endpoint', 'string', null) 31 + ->setLocked(true) 32 + ->setDescription( 33 + pht( 34 + 'SES endpoint domain name. You can find a list of available '. 35 + 'regions and endpoints in the AWS documentation.')) 36 + ->addExample( 37 + 'email.us-east-1.amazonaws.com', 38 + pht('US East (N. Virginia, Older default endpoint)')) 39 + ->addExample( 40 + 'email.us-west-2.amazonaws.com', 41 + pht('US West (Oregon)')), 30 42 $this->newOption('amazon-s3.access-key', 'string', null) 31 43 ->setLocked(true) 32 44 ->setDescription(pht('Access key for Amazon S3.')),
+2 -1
src/applications/metamta/adapter/PhabricatorMailImplementationAmazonSESAdapter.php
··· 23 23 public function executeSend($body) { 24 24 $key = PhabricatorEnv::getEnvConfig('amazon-ses.access-key'); 25 25 $secret = PhabricatorEnv::getEnvConfig('amazon-ses.secret-key'); 26 + $endpoint = PhabricatorEnv::getEnvConfig('amazon-ses.endpoint'); 26 27 27 28 $root = phutil_get_library_root('phabricator'); 28 29 $root = dirname($root); 29 30 require_once $root.'/externals/amazon-ses/ses.php'; 30 31 31 - $service = new SimpleEmailService($key, $secret); 32 + $service = new SimpleEmailService($key, $secret, $endpoint); 32 33 $service->enableUseExceptions(true); 33 34 return $service->sendRawEmail($body); 34 35 }
+1
src/docs/user/configuration/configuring_outbound_email.diviner
··· 135 135 "PhabricatorMailImplementationAmazonSESAdapter". 136 136 - **amazon-ses.access-key**: set to your Amazon SES access key. 137 137 - **amazon-ses.secret-key**: set to your Amazon SES secret key. 138 + - **amazon-ses.endpoint**: Set to your Amazon SES endpoint. 138 139 139 140 NOTE: Amazon SES **requires you to verify your "From" address**. Configure which 140 141 "From" address to use by setting "`metamta.default-address`" in your config,