Page MenuHomePhabricator
Diviner Phabricator Tech Docs PhabricatorMetaMTAMail

final class PhabricatorMetaMTAMail
Phabricator Technical Documentation (MetaMTA)

This class is not documented.

Tasks

Configuring Storage

Managing Recipients

  • public function buildRecipientList() — Get all of the recipients for this mail, after preference filters are applied. This list has all objects to whom delivery will be attempted.

Other Methods

Methods

public static function pushStorageNamespace($namespace)
Inherited

This method is not documented.
Parameters
$namespace
Return
wild

public static function popStorageNamespace()
Inherited

This method is not documented.
Return
wild

public static function getDefaultStorageNamespace()
Inherited

This method is not documented.
Return
wild

public static function getStorageNamespace()
Inherited

This method is not documented.
Return
wild

public function setForcedStorageNamespace($namespace)
Inherited

This method is not documented.
Parameters
$namespace
Return
wild

protected function establishLiveConnection($mode)
Inherited

This method is not documented.
Parameters
$mode
Return
wild

private function newClusterConnection($application, $database, $mode)
Inherited

This method is not documented.
Parameters
$application
$database
$mode
Return
wild

private function raiseImproperWrite($database)
Inherited

This method is not documented.
Parameters
$database
Return
wild

private function raiseImpossibleWrite($database)
Inherited

This method is not documented.
Parameters
$database
Return
wild

private function raiseUnconfigured($database)
Inherited

This method is not documented.
Parameters
$database
Return
wild

private function raiseUnreachable($database, $proxy)
Inherited

This method is not documented.
Parameters
$database
Exception$proxy
Return
wild

public function getTableName()
Inherited

This method is not documented.
Return
wild

public function getApplicationName()
Inherited

This method is not documented.
Return
wild

protected function getDatabaseName()
Inherited

This method is not documented.
Return
wild

public static function chunkSQL($fragments, $limit)
Inherited

PhabricatorLiskDAO

Break a list of escaped SQL statement fragments (e.g., VALUES lists for INSERT, previously built with qsprintf()) into chunks which will fit under the MySQL 'max_allowed_packet' limit.

If a statement is too large to fit within the limit, it is broken into its own chunk (but might fail when the query executes).

Parameters
array$fragments
$limit
Return
wild

protected function assertAttached($property)
Inherited

This method is not documented.
Parameters
$property
Return
wild

protected function assertAttachedKey($value, $key)
Inherited

This method is not documented.
Parameters
$value
$key
Return
wild

protected function detectEncodingForStorage($string)
Inherited

This method is not documented.
Parameters
$string
Return
wild

protected function getUTF8StringFromStorage($string, $encoding)
Inherited

This method is not documented.
Parameters
$string
$encoding
Return
wild

protected function willReadData(&$data)
Inherited

This method is not documented.
Parameters
array&$data
Return
wild

protected function willWriteData(&$data)
Inherited

This method is not documented.
Parameters
array&$data
Return
wild

public function __construct()

This method is not documented.
Return
this//Implicit.//

protected function getConfiguration()

This method is not documented.
Return
wild

public function generatePHID()

This method is not documented.
Return
wild

protected function setParam($param, $value)

This method is not documented.
Parameters
$param
$value
Return
wild

protected function getParam($param, $default)

This method is not documented.
Parameters
$param
$default
Return
wild

public function setMailTags($tags)

These tags are used to allow users to opt out of receiving certain types of mail, like updates when a task's projects change.

Parameters
list<const>$tags
Return
this

public function getMailTags()

This method is not documented.
Return
wild

public function setParentMessageID($id)

In Gmail, conversations will be broken if you reply to a thread and the server sends back a response without referencing your Message-ID, even if it references a Message-ID earlier in the thread. To avoid this, use the parent email's message ID explicitly if it's available. This overwrites the "In-Reply-To" and "References" headers we would otherwise generate. This needs to be set whenever an action is triggered by an email message. See T251 for more details.

Parameters
string$idThe "Message-ID" of the email which precedes this one.
Return
this

public function getParentMessageID()

This method is not documented.
Return
wild

public function getSubject()

This method is not documented.
Return
wild

public function addTos($phids)

This method is not documented.
Parameters
array$phids
Return
wild

public function addRawTos($raw_email)

This method is not documented.
Parameters
array$raw_email
Return
wild

public function addCCs($phids)

This method is not documented.
Parameters
array$phids
Return
wild

public function setExcludeMailRecipientPHIDs($exclude)

This method is not documented.
Parameters
array$exclude
Return
wild

private function getExcludeMailRecipientPHIDs()

This method is not documented.
Return
wild

public function setMutedPHIDs($muted)

This method is not documented.
Parameters
array$muted
Return
wild

private function getMutedPHIDs()

This method is not documented.
Return
wild

public function setForceHeraldMailRecipientPHIDs($force)

This method is not documented.
Parameters
array$force
Return
wild
This method is not documented.
Return
wild

public function addPHIDHeaders($name, $phids)

This method is not documented.
Parameters
$name
array$phids
Return
wild

public function addHeader($name, $value)

This method is not documented.
Parameters
$name
$value
Return
wild

public function getHeaders()

This method is not documented.
Return
wild

public function addAttachment($attachment)

This method is not documented.
Parameters
PhabricatorMailAttachment$attachment
Return
wild

public function getAttachments()

This method is not documented.
Return
wild

public function getAttachmentFilePHIDs()

This method is not documented.
Return
wild

public function loadAttachedFiles($viewer)

This method is not documented.
Parameters
PhabricatorUser$viewer
Return
wild

public function setAttachments($attachments)

This method is not documented.
Parameters
array$attachments
Return
wild

public function setFrom($from)

This method is not documented.
Parameters
$from
Return
wild

public function getFrom()

This method is not documented.
Return
wild

public function setRawFrom($raw_email, $raw_name)

This method is not documented.
Parameters
$raw_email
$raw_name
Return
wild

public function getRawFrom()

This method is not documented.
Return
wild

public function setReplyTo($reply_to)

This method is not documented.
Parameters
$reply_to
Return
wild

public function getReplyTo()

This method is not documented.
Return
wild

public function setSubject($subject)

This method is not documented.
Parameters
$subject
Return
wild

public function setSubjectPrefix($prefix)

This method is not documented.
Parameters
$prefix
Return
wild

public function getSubjectPrefix()

This method is not documented.
Return
wild

public function setVarySubjectPrefix($prefix)

This method is not documented.
Parameters
$prefix
Return
wild

public function getVarySubjectPrefix()

This method is not documented.
Return
wild

public function setBody($body)

This method is not documented.
Parameters
$body
Return
wild

public function setSensitiveContent($bool)

This method is not documented.
Parameters
$bool
Return
wild

public function hasSensitiveContent()

This method is not documented.
Return
wild

public function setMustEncrypt($bool)

This method is not documented.
Parameters
$bool
Return
wild

public function getMustEncrypt()

This method is not documented.
Return
wild

public function setMustEncryptURI($uri)

This method is not documented.
Parameters
$uri
Return
wild

public function getMustEncryptURI()

This method is not documented.
Return
wild

public function setMustEncryptSubject($subject)

This method is not documented.
Parameters
$subject
Return
wild

public function getMustEncryptSubject()

This method is not documented.
Return
wild

public function setMustEncryptReasons($reasons)

This method is not documented.
Parameters
array$reasons
Return
wild

public function getMustEncryptReasons()

This method is not documented.
Return
wild

public function setMailStamps($stamps)

This method is not documented.
Parameters
array$stamps
Return
wild

public function getMailStamps()

This method is not documented.
Return
wild

public function setMailStampMetadata($metadata)

This method is not documented.
Parameters
$metadata
Return
wild

public function getMailStampMetadata()

This method is not documented.
Return
wild

public function getMailerKey()

This method is not documented.
Return
wild

public function setTryMailers($mailers)

This method is not documented.
Parameters
array$mailers
Return
wild

public function setHTMLBody($html)

This method is not documented.
Parameters
$html
Return
wild

public function getBody()

This method is not documented.
Return
wild

public function getHTMLBody()

This method is not documented.
Return
wild

public function setIsErrorEmail($is_error)

This method is not documented.
Parameters
$is_error
Return
wild

public function getIsErrorEmail()

This method is not documented.
Return
wild

public function getToPHIDs()

This method is not documented.
Return
wild

public function getRawToAddresses()

This method is not documented.
Return
wild

public function getCcPHIDs()

This method is not documented.
Return
wild

public function setMessageType($message_type)

This method is not documented.
Parameters
$message_type
Return
wild

public function getMessageType()

This method is not documented.
Return
wild

public function setForceDelivery($force)

Force delivery of a message, even if recipients have preferences which would otherwise drop the message.

This is primarily intended to let users who don't want any email still receive things like password resets.

Parameters
bool$forceTrue to force delivery despite user preferences.
Return
this

public function getForceDelivery()

This method is not documented.
Return
wild

public function setIsBulk($is_bulk)

Flag that this is an auto-generated bulk message and should have bulk headers added to it if appropriate. Broadly, this means some flavor of "Precedence: bulk" or similar, but is implementation and configuration dependent.

Parameters
bool$is_bulkTrue if the mail is automated bulk mail.
Return
this

public function getIsBulk()

This method is not documented.
Return
wild

public function setThreadID($thread_id, $is_first_message)

Use this method to set an ID used for message threading. MetaMTA will set appropriate headers (Message-ID, In-Reply-To, References and Thread-Index) based on the capabilities of the underlying mailer.

Parameters
string$thread_idUnique identifier, appropriate for use in a Message-ID, In-Reply-To or References headers.
bool$is_first_messageIf true, indicates this is the first message in the thread.
Return
this

public function getThreadID()

This method is not documented.
Return
wild

public function getIsFirstMessage()

This method is not documented.
Return
wild

public function saveAndSend()

Save a newly created mail to the database. The mail will eventually be delivered by the MetaMTA daemon.

Return
this

public function save()

This method is not documented.
Return
this

public function sendNow()

Attempt to deliver an email immediately, in this process.

Return
void

public static function newMailers($constraints)

This method is not documented.
Parameters
array$constraints
Return
wild

public function sendWithMailers($mailers)

This method is not documented.
Parameters
array$mailers
Return
wild

public static function shouldMailEachRecipient()

This method is not documented.
Return
wild

public function buildRecipientList()

Get all of the recipients for this mail, after preference filters are applied. This list has all objects to whom delivery will be attempted.

Note that this expands recipients into their members, because delivery is never directly attempted to aggregate actors like projects.

Return
list<phid>A list of all recipients to whom delivery will be attempted.

public function loadAllActors()

This method is not documented.
Return
wild

public function getExpandedRecipientPHIDs()

This method is not documented.
Return
wild

private function getAllActorPHIDs()

This method is not documented.
Return
wild

public function expandRecipients($phids)

Expand a list of recipient PHIDs (possibly including aggregate recipients like projects) into a deaggregated list of individual recipient PHIDs. For example, this will expand project PHIDs into a list of the project's members.

Parameters
list<phid>$phidsList of recipient PHIDs, possibly including aggregate recipients.
Return
list<phid>Deaggregated list of mailable recipients.

private function filterDeliverableActors($actors)

This method is not documented.
Parameters
array$actors
Return
wild

private function loadActors($actor_phids)

This method is not documented.
Parameters
array$actor_phids
Return
wild

public function getDeliveredHeaders()

This method is not documented.
Return
wild

public function setDeliveredHeaders($headers)

This method is not documented.
Parameters
array$headers
Return
wild

public function getUnfilteredHeaders()

This method is not documented.
Return
wild

public function setUnfilteredHeaders($headers)

This method is not documented.
Parameters
array$headers
Return
wild

private function flattenHeaders($headers)

This method is not documented.
Parameters
array$headers
Return
wild

public function getDeliveredActors()

This method is not documented.
Return
wild

public function getDeliveredRoutingRules()

This method is not documented.
Return
wild

public function getDeliveredRoutingMap()

This method is not documented.
Return
wild

public function getDeliveredBody()

This method is not documented.
Return
wild

public function setDeliveredBody($body)

This method is not documented.
Parameters
$body
Return
wild

public function getURI()

This method is not documented.
Return
wild

public function addRoutingRule($routing_rule, $phids, $reason_phid)

This method is not documented.
Parameters
$routing_rule
$phids
$reason_phid
Return
wild

private function getRoutingRule($phid)

This method is not documented.
Parameters
$phid
Return
wild

private function getRoutingRuleMap()

This method is not documented.
Return
wild

private function loadPreferences($target_phid)

This method is not documented.
Parameters
$target_phid
Return
wild

public function shouldRenderMailStampsInBody($viewer)

This method is not documented.
Parameters
$viewer
Return
wild

public function getCapabilities()

This method is not documented.
Return
wild

public function getPolicy($capability)

This method is not documented.
Parameters
$capability
Return
wild

public function hasAutomaticCapability($capability, $viewer)

This method is not documented.
Parameters
$capability
PhabricatorUser$viewer
Return
wild

public function describeAutomaticCapability($capability)

This method is not documented.
Parameters
$capability
Return
wild

public function destroyObjectPermanently($engine)

This method is not documented.
Parameters
PhabricatorDestructionEngine$engine
Return
wild