Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
<?php | <?php | ||||
/** | /** | ||||
* @task recipients Managing Recipients | * @task recipients Managing Recipients | ||||
*/ | */ | ||||
final class PhabricatorMetaMTAMail | final class PhabricatorMetaMTAMail | ||||
extends PhabricatorMetaMTADAO | extends PhabricatorMetaMTADAO | ||||
implements PhabricatorPolicyInterface { | implements | ||||
PhabricatorPolicyInterface, | |||||
PhabricatorDestructibleInterface { | |||||
const RETRY_DELAY = 5; | const RETRY_DELAY = 5; | ||||
protected $actorPHID; | protected $actorPHID; | ||||
protected $parameters = array(); | protected $parameters = array(); | ||||
protected $status; | protected $status; | ||||
protected $message; | protected $message; | ||||
protected $relatedPHID; | protected $relatedPHID; | ||||
▲ Show 20 Lines • Show All 1,019 Lines • ▼ Show 20 Lines | try { | ||||
new PhabricatorMetaMTAErrorMailAction(), | new PhabricatorMetaMTAErrorMailAction(), | ||||
1); | 1); | ||||
return false; | return false; | ||||
} catch (PhabricatorSystemActionRateLimitException $ex) { | } catch (PhabricatorSystemActionRateLimitException $ex) { | ||||
return true; | return true; | ||||
} | } | ||||
} | } | ||||
public function delete() { | |||||
$this->openTransaction(); | |||||
queryfx( | |||||
$this->establishConnection('w'), | |||||
'DELETE FROM %T WHERE src = %s AND type = %d', | |||||
PhabricatorEdgeConfig::TABLE_NAME_EDGE, | |||||
$this->getPHID(), | |||||
PhabricatorMetaMTAMailHasRecipientEdgeType::EDGECONST); | |||||
$ret = parent::delete(); | |||||
$this->saveTransaction(); | |||||
return $ret; | |||||
} | |||||
public function generateHeaders() { | public function generateHeaders() { | ||||
$headers = array(); | $headers = array(); | ||||
$headers[] = array('X-Phabricator-Sent-This-Message', 'Yes'); | $headers[] = array('X-Phabricator-Sent-This-Message', 'Yes'); | ||||
$headers[] = array('X-Mail-Transport-Agent', 'MetaMTA'); | $headers[] = array('X-Mail-Transport-Agent', 'MetaMTA'); | ||||
// Some clients respect this to suppress OOF and other auto-responses. | // Some clients respect this to suppress OOF and other auto-responses. | ||||
$headers[] = array('X-Auto-Response-Suppress', 'All'); | $headers[] = array('X-Auto-Response-Suppress', 'All'); | ||||
▲ Show 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | /* -( PhabricatorPolicyInterface )----------------------------------------- */ | ||||
} | } | ||||
public function describeAutomaticCapability($capability) { | public function describeAutomaticCapability($capability) { | ||||
return pht( | return pht( | ||||
'The mail sender and message recipients can always see the mail.'); | 'The mail sender and message recipients can always see the mail.'); | ||||
} | } | ||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */ | |||||
public function destroyObjectPermanently( | |||||
PhabricatorDestructionEngine $engine) {} | |||||
} | } |