class-Mandrill_Inbound.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta name="generator" content="ApiGen 2.8.0" />
  6. <title>Class Mandrill_Inbound</title>
  7. <script type="text/javascript" src="resources/combined.js?394153670"></script>
  8. <script type="text/javascript" src="elementlist.js?882160656"></script>
  9. <link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" />
  10. </head>
  11. <body>
  12. <div id="left">
  13. <div id="menu">
  14. <a href="index.html" title="Overview"><span>Overview</span></a>
  15. <div id="groups">
  16. <h3>Namespaces</h3>
  17. <ul>
  18. <li class="active"><a href="namespace-None.html">None</a>
  19. </li>
  20. <li><a href="namespace-PHP.html">PHP</a>
  21. </li>
  22. </ul>
  23. </div>
  24. <hr />
  25. <div id="elements">
  26. <h3>Classes</h3>
  27. <ul>
  28. <li><a href="class-Mandrill.html">Mandrill</a></li>
  29. <li><a href="class-Mandrill_Exports.html">Mandrill_Exports</a></li>
  30. <li class="active"><a href="class-Mandrill_Inbound.html">Mandrill_Inbound</a></li>
  31. <li><a href="class-Mandrill_Internal.html">Mandrill_Internal</a></li>
  32. <li><a href="class-Mandrill_Ips.html">Mandrill_Ips</a></li>
  33. <li><a href="class-Mandrill_Messages.html">Mandrill_Messages</a></li>
  34. <li><a href="class-Mandrill_Metadata.html">Mandrill_Metadata</a></li>
  35. <li><a href="class-Mandrill_Rejects.html">Mandrill_Rejects</a></li>
  36. <li><a href="class-Mandrill_Senders.html">Mandrill_Senders</a></li>
  37. <li><a href="class-Mandrill_Subaccounts.html">Mandrill_Subaccounts</a></li>
  38. <li><a href="class-Mandrill_Tags.html">Mandrill_Tags</a></li>
  39. <li><a href="class-Mandrill_Templates.html">Mandrill_Templates</a></li>
  40. <li><a href="class-Mandrill_Urls.html">Mandrill_Urls</a></li>
  41. <li><a href="class-Mandrill_Users.html">Mandrill_Users</a></li>
  42. <li><a href="class-Mandrill_Webhooks.html">Mandrill_Webhooks</a></li>
  43. <li><a href="class-Mandrill_Whitelists.html">Mandrill_Whitelists</a></li>
  44. </ul>
  45. <h3>Exceptions</h3>
  46. <ul>
  47. <li><a href="class-Mandrill_Error.html">Mandrill_Error</a></li>
  48. <li><a href="class-Mandrill_HttpError.html">Mandrill_HttpError</a></li>
  49. <li><a href="class-Mandrill_Invalid_CustomDNS.html">Mandrill_Invalid_CustomDNS</a></li>
  50. <li><a href="class-Mandrill_Invalid_CustomDNSPending.html">Mandrill_Invalid_CustomDNSPending</a></li>
  51. <li><a href="class-Mandrill_Invalid_DeleteDefaultPool.html">Mandrill_Invalid_DeleteDefaultPool</a></li>
  52. <li><a href="class-Mandrill_Invalid_DeleteNonEmptyPool.html">Mandrill_Invalid_DeleteNonEmptyPool</a></li>
  53. <li><a href="class-Mandrill_Invalid_EmptyDefaultPool.html">Mandrill_Invalid_EmptyDefaultPool</a></li>
  54. <li><a href="class-Mandrill_Invalid_Key.html">Mandrill_Invalid_Key</a></li>
  55. <li><a href="class-Mandrill_Invalid_Reject.html">Mandrill_Invalid_Reject</a></li>
  56. <li><a href="class-Mandrill_Invalid_Tag_Name.html">Mandrill_Invalid_Tag_Name</a></li>
  57. <li><a href="class-Mandrill_Invalid_Template.html">Mandrill_Invalid_Template</a></li>
  58. <li><a href="class-Mandrill_IP_ProvisionLimit.html">Mandrill_IP_ProvisionLimit</a></li>
  59. <li><a href="class-Mandrill_Metadata_FieldLimit.html">Mandrill_Metadata_FieldLimit</a></li>
  60. <li><a href="class-Mandrill_NoSendingHistory.html">Mandrill_NoSendingHistory</a></li>
  61. <li><a href="class-Mandrill_PaymentRequired.html">Mandrill_PaymentRequired</a></li>
  62. <li><a href="class-Mandrill_PoorReputation.html">Mandrill_PoorReputation</a></li>
  63. <li><a href="class-Mandrill_ServiceUnavailable.html">Mandrill_ServiceUnavailable</a></li>
  64. <li><a href="class-Mandrill_Unknown_Export.html">Mandrill_Unknown_Export</a></li>
  65. <li><a href="class-Mandrill_Unknown_InboundDomain.html">Mandrill_Unknown_InboundDomain</a></li>
  66. <li><a href="class-Mandrill_Unknown_InboundRoute.html">Mandrill_Unknown_InboundRoute</a></li>
  67. <li><a href="class-Mandrill_Unknown_IP.html">Mandrill_Unknown_IP</a></li>
  68. <li><a href="class-Mandrill_Unknown_Message.html">Mandrill_Unknown_Message</a></li>
  69. <li><a href="class-Mandrill_Unknown_MetadataField.html">Mandrill_Unknown_MetadataField</a></li>
  70. <li><a href="class-Mandrill_Unknown_Pool.html">Mandrill_Unknown_Pool</a></li>
  71. <li><a href="class-Mandrill_Unknown_Sender.html">Mandrill_Unknown_Sender</a></li>
  72. <li><a href="class-Mandrill_Unknown_Subaccount.html">Mandrill_Unknown_Subaccount</a></li>
  73. <li><a href="class-Mandrill_Unknown_Template.html">Mandrill_Unknown_Template</a></li>
  74. <li><a href="class-Mandrill_Unknown_TrackingDomain.html">Mandrill_Unknown_TrackingDomain</a></li>
  75. <li><a href="class-Mandrill_Unknown_Url.html">Mandrill_Unknown_Url</a></li>
  76. <li><a href="class-Mandrill_Unknown_Webhook.html">Mandrill_Unknown_Webhook</a></li>
  77. <li><a href="class-Mandrill_ValidationError.html">Mandrill_ValidationError</a></li>
  78. </ul>
  79. </div>
  80. </div>
  81. </div>
  82. <div id="splitter"></div>
  83. <div id="right">
  84. <div id="rightInner">
  85. <form id="search">
  86. <input type="hidden" name="cx" value="" />
  87. <input type="hidden" name="ie" value="UTF-8" />
  88. <input type="text" name="q" class="text" />
  89. <input type="submit" value="Search" />
  90. </form>
  91. <div id="navigation">
  92. <ul>
  93. <li>
  94. <a href="index.html" title="Overview"><span>Overview</span></a>
  95. </li>
  96. <li>
  97. <a href="namespace-None.html" title="Summary of None"><span>Namespace</span></a>
  98. </li>
  99. <li class="active">
  100. <span>Class</span> </li>
  101. </ul>
  102. <ul>
  103. <li>
  104. <a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
  105. </li>
  106. </ul>
  107. <ul>
  108. </ul>
  109. </div>
  110. <div id="content" class="class">
  111. <h1>Class Mandrill_Inbound</h1>
  112. <div class="info">
  113. <b>Located at</b> <a href="source-class-Mandrill_Inbound.html#3-136" title="Go to source code">Mandrill/Inbound.php</a><br />
  114. </div>
  115. <table class="summary" id="methods">
  116. <caption>Methods summary</caption>
  117. <tr data-order="__construct" id="___construct">
  118. <td class="attributes"><code>
  119. public
  120. </code>
  121. </td>
  122. <td class="name"><div>
  123. <a class="anchor" href="#___construct">#</a>
  124. <code><a href="source-class-Mandrill_Inbound.html#4-6" title="Go to source code">__construct</a>( <span><code><a href="class-Mandrill.html">Mandrill</a></code> <var>$master</var></span> )</code>
  125. <div class="description short">
  126. </div>
  127. <div class="description detailed hidden">
  128. </div>
  129. </div></td>
  130. </tr>
  131. <tr data-order="domains" id="_domains">
  132. <td class="attributes"><code>
  133. public
  134. array
  135. </code>
  136. </td>
  137. <td class="name"><div>
  138. <a class="anchor" href="#_domains">#</a>
  139. <code><a href="source-class-Mandrill_Inbound.html#8-19" title="Go to source code">domains</a>( )</code>
  140. <div class="description short">
  141. <p>List the domains that have been configured for inbound delivery</p>
  142. </div>
  143. <div class="description detailed hidden">
  144. <p>List the domains that have been configured for inbound delivery</p>
  145. <h4>Returns</h4>
  146. <div class="list">
  147. <code>array</code><br>the inbound domains associated with the account - return[] struct the individual
  148. domain info - domain string the domain name that is accepting mail - created_at
  149. string the date and time that the inbound domain was added as a UTC string in
  150. YYYY-MM-DD HH:MM:SS format - valid_mx boolean true if this inbound domain has
  151. successfully set up an MX record to deliver mail to the Mandrill servers<br />
  152. </div>
  153. </div>
  154. </div></td>
  155. </tr>
  156. <tr data-order="addDomain" id="_addDomain">
  157. <td class="attributes"><code>
  158. public
  159. struct
  160. </code>
  161. </td>
  162. <td class="name"><div>
  163. <a class="anchor" href="#_addDomain">#</a>
  164. <code><a href="source-class-Mandrill_Inbound.html#21-32" title="Go to source code">addDomain</a>( <span>string <var>$domain</var></span> )</code>
  165. <div class="description short">
  166. <p>Add an inbound domain to your account</p>
  167. </div>
  168. <div class="description detailed hidden">
  169. <p>Add an inbound domain to your account</p>
  170. <h4>Parameters</h4>
  171. <div class="list"><dl>
  172. <dt><var>$domain</var></dt>
  173. <dd><code>string</code><br>$domain a domain name</dd>
  174. </dl></div>
  175. <h4>Returns</h4>
  176. <div class="list">
  177. <code>struct</code><br>information about the domain - domain string the domain name that is accepting
  178. mail - created_at string the date and time that the inbound domain was added as
  179. a UTC string in YYYY-MM-DD HH:MM:SS format - valid_mx boolean true if this
  180. inbound domain has successfully set up an MX record to deliver mail to the
  181. Mandrill servers<br />
  182. </div>
  183. </div>
  184. </div></td>
  185. </tr>
  186. <tr data-order="checkDomain" id="_checkDomain">
  187. <td class="attributes"><code>
  188. public
  189. struct
  190. </code>
  191. </td>
  192. <td class="name"><div>
  193. <a class="anchor" href="#_checkDomain">#</a>
  194. <code><a href="source-class-Mandrill_Inbound.html#34-45" title="Go to source code">checkDomain</a>( <span>string <var>$domain</var></span> )</code>
  195. <div class="description short">
  196. <p>Check the MX settings for an inbound domain. The domain must have already
  197. been added with the add-domain call</p>
  198. </div>
  199. <div class="description detailed hidden">
  200. <p>Check the MX settings for an inbound domain. The domain must have already
  201. been added with the add-domain call</p>
  202. <h4>Parameters</h4>
  203. <div class="list"><dl>
  204. <dt><var>$domain</var></dt>
  205. <dd><code>string</code><br>$domain an existing inbound domain</dd>
  206. </dl></div>
  207. <h4>Returns</h4>
  208. <div class="list">
  209. <code>struct</code><br>information about the inbound domain - domain string the domain name that is
  210. accepting mail - created_at string the date and time that the inbound domain was
  211. added as a UTC string in YYYY-MM-DD HH:MM:SS format - valid_mx boolean true if
  212. this inbound domain has successfully set up an MX record to deliver mail to the
  213. Mandrill servers<br />
  214. </div>
  215. </div>
  216. </div></td>
  217. </tr>
  218. <tr data-order="deleteDomain" id="_deleteDomain">
  219. <td class="attributes"><code>
  220. public
  221. struct
  222. </code>
  223. </td>
  224. <td class="name"><div>
  225. <a class="anchor" href="#_deleteDomain">#</a>
  226. <code><a href="source-class-Mandrill_Inbound.html#47-58" title="Go to source code">deleteDomain</a>( <span>string <var>$domain</var></span> )</code>
  227. <div class="description short">
  228. <p>Delete an inbound domain from the account. All mail will stop routing for
  229. this domain immediately.</p>
  230. </div>
  231. <div class="description detailed hidden">
  232. <p>Delete an inbound domain from the account. All mail will stop routing for
  233. this domain immediately.</p>
  234. <h4>Parameters</h4>
  235. <div class="list"><dl>
  236. <dt><var>$domain</var></dt>
  237. <dd><code>string</code><br>$domain an existing inbound domain</dd>
  238. </dl></div>
  239. <h4>Returns</h4>
  240. <div class="list">
  241. <code>struct</code><br>information about the deleted domain - domain string the domain name that is
  242. accepting mail - created_at string the date and time that the inbound domain was
  243. added as a UTC string in YYYY-MM-DD HH:MM:SS format - valid_mx boolean true if
  244. this inbound domain has successfully set up an MX record to deliver mail to the
  245. Mandrill servers<br />
  246. </div>
  247. </div>
  248. </div></td>
  249. </tr>
  250. <tr data-order="routes" id="_routes">
  251. <td class="attributes"><code>
  252. public
  253. array
  254. </code>
  255. </td>
  256. <td class="name"><div>
  257. <a class="anchor" href="#_routes">#</a>
  258. <code><a href="source-class-Mandrill_Inbound.html#60-72" title="Go to source code">routes</a>( <span>string <var>$domain</var></span> )</code>
  259. <div class="description short">
  260. <p>List the mailbox routes defined for an inbound domain</p>
  261. </div>
  262. <div class="description detailed hidden">
  263. <p>List the mailbox routes defined for an inbound domain</p>
  264. <h4>Parameters</h4>
  265. <div class="list"><dl>
  266. <dt><var>$domain</var></dt>
  267. <dd><code>string</code><br>$domain the domain to check</dd>
  268. </dl></div>
  269. <h4>Returns</h4>
  270. <div class="list">
  271. <code>array</code><br>the routes associated with the domain - return[] struct the individual mailbox
  272. route - id string the unique identifier of the route - pattern string the search
  273. pattern that the mailbox name should match - url string the webhook URL where
  274. inbound messages will be published<br />
  275. </div>
  276. </div>
  277. </div></td>
  278. </tr>
  279. <tr data-order="addRoute" id="_addRoute">
  280. <td class="attributes"><code>
  281. public
  282. struct
  283. </code>
  284. </td>
  285. <td class="name"><div>
  286. <a class="anchor" href="#_addRoute">#</a>
  287. <code><a href="source-class-Mandrill_Inbound.html#74-87" title="Go to source code">addRoute</a>( <span>string <var>$domain</var></span>, <span>string <var>$pattern</var></span>, <span>string <var>$url</var></span> )</code>
  288. <div class="description short">
  289. <p>Add a new mailbox route to an inbound domain</p>
  290. </div>
  291. <div class="description detailed hidden">
  292. <p>Add a new mailbox route to an inbound domain</p>
  293. <h4>Parameters</h4>
  294. <div class="list"><dl>
  295. <dt><var>$domain</var></dt>
  296. <dd><code>string</code><br>$domain an existing inbound domain</dd>
  297. <dt><var>$pattern</var></dt>
  298. <dd><code>string</code><br>$pattern the search pattern that the mailbox name should match</dd>
  299. <dt><var>$url</var></dt>
  300. <dd><code>string</code><br>$url the webhook URL where the inbound messages will be published</dd>
  301. </dl></div>
  302. <h4>Returns</h4>
  303. <div class="list">
  304. <code>struct</code><br>the added mailbox route information - id string the unique identifier of the
  305. route - pattern string the search pattern that the mailbox name should match -
  306. url string the webhook URL where inbound messages will be published<br />
  307. </div>
  308. </div>
  309. </div></td>
  310. </tr>
  311. <tr data-order="updateRoute" id="_updateRoute">
  312. <td class="attributes"><code>
  313. public
  314. struct
  315. </code>
  316. </td>
  317. <td class="name"><div>
  318. <a class="anchor" href="#_updateRoute">#</a>
  319. <code><a href="source-class-Mandrill_Inbound.html#89-102" title="Go to source code">updateRoute</a>( <span>string <var>$id</var></span>, <span>string <var>$pattern</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$url</var> = <span class="php-keyword1">null</span></span> )</code>
  320. <div class="description short">
  321. <p>Update the pattern or webhook of an existing inbound mailbox route. If null
  322. is provided for any fields, the values will remain unchanged.</p>
  323. </div>
  324. <div class="description detailed hidden">
  325. <p>Update the pattern or webhook of an existing inbound mailbox route. If null
  326. is provided for any fields, the values will remain unchanged.</p>
  327. <h4>Parameters</h4>
  328. <div class="list"><dl>
  329. <dt><var>$id</var></dt>
  330. <dd><code>string</code><br>$id the unique identifier of an existing mailbox route</dd>
  331. <dt><var>$pattern</var></dt>
  332. <dd><code>string</code><br>$pattern the search pattern that the mailbox name should match</dd>
  333. <dt><var>$url</var></dt>
  334. <dd><code>string</code><br>$url the webhook URL where the inbound messages will be published</dd>
  335. </dl></div>
  336. <h4>Returns</h4>
  337. <div class="list">
  338. <code>struct</code><br>the updated mailbox route information - id string the unique identifier of the
  339. route - pattern string the search pattern that the mailbox name should match -
  340. url string the webhook URL where inbound messages will be published<br />
  341. </div>
  342. </div>
  343. </div></td>
  344. </tr>
  345. <tr data-order="deleteRoute" id="_deleteRoute">
  346. <td class="attributes"><code>
  347. public
  348. struct
  349. </code>
  350. </td>
  351. <td class="name"><div>
  352. <a class="anchor" href="#_deleteRoute">#</a>
  353. <code><a href="source-class-Mandrill_Inbound.html#104-115" title="Go to source code">deleteRoute</a>( <span>string <var>$id</var></span> )</code>
  354. <div class="description short">
  355. <p>Delete an existing inbound mailbox route</p>
  356. </div>
  357. <div class="description detailed hidden">
  358. <p>Delete an existing inbound mailbox route</p>
  359. <h4>Parameters</h4>
  360. <div class="list"><dl>
  361. <dt><var>$id</var></dt>
  362. <dd><code>string</code><br>$id the unique identifier of an existing route</dd>
  363. </dl></div>
  364. <h4>Returns</h4>
  365. <div class="list">
  366. <code>struct</code><br>the deleted mailbox route information - id string the unique identifier of the
  367. route - pattern string the search pattern that the mailbox name should match -
  368. url string the webhook URL where inbound messages will be published<br />
  369. </div>
  370. </div>
  371. </div></td>
  372. </tr>
  373. <tr data-order="sendRaw" id="_sendRaw">
  374. <td class="attributes"><code>
  375. public
  376. array
  377. </code>
  378. </td>
  379. <td class="name"><div>
  380. <a class="anchor" href="#_sendRaw">#</a>
  381. <code><a href="source-class-Mandrill_Inbound.html#117-134" title="Go to source code">sendRaw</a>( <span>string <var>$raw_message</var></span>, <span>array|null <var>$to</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$mail_from</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$helo</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$client_address</var> = <span class="php-keyword1">null</span></span> )</code>
  382. <div class="description short">
  383. <p>Take a raw MIME document destined for a domain with inbound domains set up,
  384. and send it to the inbound hook exactly as if it had been sent over SMTP</p>
  385. </div>
  386. <div class="description detailed hidden">
  387. <p>Take a raw MIME document destined for a domain with inbound domains set up,
  388. and send it to the inbound hook exactly as if it had been sent over SMTP</p>
  389. <h4>Parameters</h4>
  390. <div class="list"><dl>
  391. <dt><var>$raw_message</var></dt>
  392. <dd><code>string</code><br>$raw_message the full MIME document of an email message</dd>
  393. <dt><var>$to</var></dt>
  394. <dd><code>array|null</code><br>$to optionally define the recipients to receive the message - otherwise we'll
  395. use the To, Cc, and Bcc headers provided in the document - to[] string the email
  396. address of the recipient</dd>
  397. <dt><var>$mail_from</var></dt>
  398. <dd><code>string</code><br>$mail_from the address specified in the MAIL FROM stage of the SMTP
  399. conversation. Required for the SPF check.</dd>
  400. <dt><var>$helo</var></dt>
  401. <dd><code>string</code><br>$helo the identification provided by the client mta in the MTA state of the SMTP
  402. conversation. Required for the SPF check.</dd>
  403. <dt><var>$client_address</var></dt>
  404. <dd><code>string</code><br>$client_address the remote MTA's ip address. Optional; required for the SPF
  405. check.</dd>
  406. </dl></div>
  407. <h4>Returns</h4>
  408. <div class="list">
  409. <code>array</code><br>an array of the information for each recipient in the message (usually one) that
  410. matched an inbound route - return[] struct the individual recipient information
  411. - email string the email address of the matching recipient - pattern string the
  412. mailbox route pattern that the recipient matched - url string the webhook URL
  413. that the message was posted to<br />
  414. </div>
  415. </div>
  416. </div></td>
  417. </tr>
  418. </table>
  419. </div>
  420. <div id="footer">
  421. API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
  422. </div>
  423. </div>
  424. </div>
  425. </body>
  426. </html>