Documentation

Inbound
in package

Manage your inbound domains and routes.

Table of Contents

Properties

$master  : mixed

Methods

__construct()  : mixed
addDomain()  : struct
Add an inbound domain to your account.
addRoute()  : struct
Add a new mailbox route to an inbound domain.
checkDomain()  : struct
Check the MX settings for an inbound domain. The domain must have already been added with the add-domain call.
deleteDomain()  : struct
Delete an inbound domain from the account. All mail will stop routing for this domain immediately.
deleteRoute()  : struct
Delete an existing inbound mailbox route.
domains()  : array<string|int, mixed>
List the domains that have been configured for inbound delivery.
routes()  : array<string|int, mixed>
List the mailbox routes defined for an inbound domain.
sendRaw()  : array<string|int, mixed>
Take a raw MIME document destined for a domain with inbound domains set up, and send it to the inbound hook exactly as if it had been sent over SMTP.
updateRoute()  : struct
Update the pattern or webhook of an existing inbound mailbox route. If null is provided for any fields, the values will remain unchanged.

Properties

Methods

addDomain()

Add an inbound domain to your account.

public addDomain(string $domain) : struct
Parameters
$domain : string

a domain name

Return values
struct

information about the domain

  • domain string the domain name that is accepting mail
  • created_at string the date and time that the inbound domain was added as a UTC string in YYYY-MM-DD HH:MM:SS format
  • valid_mx boolean true if this inbound domain has successfully set up an MX record to deliver mail to the Mandrill servers

addRoute()

Add a new mailbox route to an inbound domain.

public addRoute(string $domain, string $pattern, string $url) : struct
Parameters
$domain : string

an existing inbound domain

$pattern : string

the search pattern that the mailbox name should match

$url : string

the webhook URL where the inbound messages will be published

Return values
struct

the added mailbox route information

  • id string the unique identifier of the route
  • pattern string the search pattern that the mailbox name should match
  • url string the webhook URL where inbound messages will be published

checkDomain()

Check the MX settings for an inbound domain. The domain must have already been added with the add-domain call.

public checkDomain(string $domain) : struct
Parameters
$domain : string

an existing inbound domain

Return values
struct

information about the inbound domain

  • domain string the domain name that is accepting mail
  • created_at string the date and time that the inbound domain was added as a UTC string in YYYY-MM-DD HH:MM:SS format
  • valid_mx boolean true if this inbound domain has successfully set up an MX record to deliver mail to the Mandrill servers

deleteDomain()

Delete an inbound domain from the account. All mail will stop routing for this domain immediately.

public deleteDomain(string $domain) : struct
Parameters
$domain : string

an existing inbound domain

Return values
struct

information about the deleted domain

  • domain string the domain name that is accepting mail
  • created_at string the date and time that the inbound domain was added as a UTC string in YYYY-MM-DD HH:MM:SS format
  • valid_mx boolean true if this inbound domain has successfully set up an MX record to deliver mail to the Mandrill servers

deleteRoute()

Delete an existing inbound mailbox route.

public deleteRoute(string $id) : struct
Parameters
$id : string

the unique identifier of an existing route

Return values
struct

the deleted mailbox route information

  • id string the unique identifier of the route
  • pattern string the search pattern that the mailbox name should match
  • url string the webhook URL where inbound messages will be published

domains()

List the domains that have been configured for inbound delivery.

public domains() : array<string|int, mixed>
Return values
array<string|int, mixed>

the inbound domains associated with the account

  • return[] struct the individual domain info
  • domain string the domain name that is accepting mail
  • created_at string the date and time that the inbound domain was added as a UTC string in YYYY-MM-DD HH:MM:SS format
  • valid_mx boolean true if this inbound domain has successfully set up an MX record to deliver mail to the Mandrill servers

routes()

List the mailbox routes defined for an inbound domain.

public routes(string $domain) : array<string|int, mixed>
Parameters
$domain : string

the domain to check

Return values
array<string|int, mixed>

the routes associated with the domain

  • return[] struct the individual mailbox route
  • id string the unique identifier of the route
  • pattern string the search pattern that the mailbox name should match
  • url string the webhook URL where inbound messages will be published

sendRaw()

Take a raw MIME document destined for a domain with inbound domains set up, and send it to the inbound hook exactly as if it had been sent over SMTP.

public sendRaw(string $rawMessage[, array<string|int, mixed>|null $to = null ][, string $mailFrom = null ][, string $helo = null ][, string $clientAddress = null ]) : array<string|int, mixed>
Parameters
$rawMessage : string

the full MIME document of an email message

$to : array<string|int, mixed>|null = null

optionally define the recipients to receive the message - otherwise we'll use the To, Cc, and Bcc headers provided in the document

  • to[] string the email address of the recipient
$mailFrom : string = null

the address specified in the MAIL FROM stage of the SMTP conversation. Required for the SPF check.

$helo : string = null

the identification provided by the client mta in the MTA state of the SMTP conversation. Required for the SPF check.

$clientAddress : string = null

the remote MTA's ip address. Optional; required for the SPF check.

Return values
array<string|int, mixed>

an array of the information for each recipient in the message (usually one) that matched an inbound route

  • return[] struct the individual recipient information
  • email string the email address of the matching recipient
  • pattern string the mailbox route pattern that the recipient matched
  • url string the webhook URL that the message was posted to

updateRoute()

Update the pattern or webhook of an existing inbound mailbox route. If null is provided for any fields, the values will remain unchanged.

public updateRoute(string $id[, string $pattern = null ][, string $url = null ]) : struct
Parameters
$id : string

the unique identifier of an existing mailbox route

$pattern : string = null

the search pattern that the mailbox name should match

$url : string = null

the webhook URL where the inbound messages will be published

Return values
struct

the updated mailbox route information

  • id string the unique identifier of the route
  • pattern string the search pattern that the mailbox name should match
  • url string the webhook URL where inbound messages will be published

        
On this page

Search results