| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038 | <!DOCTYPE html><html><head>	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	<meta name="generator" content="ApiGen 2.8.0" />	<title>Class Mandrill_Messages</title>	<script type="text/javascript" src="resources/combined.js?394153670"></script>	<script type="text/javascript" src="elementlist.js?882160656"></script>	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" /></head><body><div id="left">	<div id="menu">		<a href="index.html" title="Overview"><span>Overview</span></a>		<div id="groups">			<h3>Namespaces</h3>			<ul>				<li class="active"><a href="namespace-None.html">None</a>						</li>				<li><a href="namespace-PHP.html">PHP</a>						</li>			</ul>		</div>		<hr />		<div id="elements">			<h3>Classes</h3>			<ul>				<li><a href="class-Mandrill.html">Mandrill</a></li>				<li><a href="class-Mandrill_Exports.html">Mandrill_Exports</a></li>				<li><a href="class-Mandrill_Inbound.html">Mandrill_Inbound</a></li>				<li><a href="class-Mandrill_Internal.html">Mandrill_Internal</a></li>				<li><a href="class-Mandrill_Ips.html">Mandrill_Ips</a></li>				<li class="active"><a href="class-Mandrill_Messages.html">Mandrill_Messages</a></li>				<li><a href="class-Mandrill_Metadata.html">Mandrill_Metadata</a></li>				<li><a href="class-Mandrill_Rejects.html">Mandrill_Rejects</a></li>				<li><a href="class-Mandrill_Senders.html">Mandrill_Senders</a></li>				<li><a href="class-Mandrill_Subaccounts.html">Mandrill_Subaccounts</a></li>				<li><a href="class-Mandrill_Tags.html">Mandrill_Tags</a></li>				<li><a href="class-Mandrill_Templates.html">Mandrill_Templates</a></li>				<li><a href="class-Mandrill_Urls.html">Mandrill_Urls</a></li>				<li><a href="class-Mandrill_Users.html">Mandrill_Users</a></li>				<li><a href="class-Mandrill_Webhooks.html">Mandrill_Webhooks</a></li>				<li><a href="class-Mandrill_Whitelists.html">Mandrill_Whitelists</a></li>			</ul>			<h3>Exceptions</h3>			<ul>				<li><a href="class-Mandrill_Error.html">Mandrill_Error</a></li>				<li><a href="class-Mandrill_HttpError.html">Mandrill_HttpError</a></li>				<li><a href="class-Mandrill_Invalid_CustomDNS.html">Mandrill_Invalid_CustomDNS</a></li>				<li><a href="class-Mandrill_Invalid_CustomDNSPending.html">Mandrill_Invalid_CustomDNSPending</a></li>				<li><a href="class-Mandrill_Invalid_DeleteDefaultPool.html">Mandrill_Invalid_DeleteDefaultPool</a></li>				<li><a href="class-Mandrill_Invalid_DeleteNonEmptyPool.html">Mandrill_Invalid_DeleteNonEmptyPool</a></li>				<li><a href="class-Mandrill_Invalid_EmptyDefaultPool.html">Mandrill_Invalid_EmptyDefaultPool</a></li>				<li><a href="class-Mandrill_Invalid_Key.html">Mandrill_Invalid_Key</a></li>				<li><a href="class-Mandrill_Invalid_Reject.html">Mandrill_Invalid_Reject</a></li>				<li><a href="class-Mandrill_Invalid_Tag_Name.html">Mandrill_Invalid_Tag_Name</a></li>				<li><a href="class-Mandrill_Invalid_Template.html">Mandrill_Invalid_Template</a></li>				<li><a href="class-Mandrill_IP_ProvisionLimit.html">Mandrill_IP_ProvisionLimit</a></li>				<li><a href="class-Mandrill_Metadata_FieldLimit.html">Mandrill_Metadata_FieldLimit</a></li>				<li><a href="class-Mandrill_NoSendingHistory.html">Mandrill_NoSendingHistory</a></li>				<li><a href="class-Mandrill_PaymentRequired.html">Mandrill_PaymentRequired</a></li>				<li><a href="class-Mandrill_PoorReputation.html">Mandrill_PoorReputation</a></li>				<li><a href="class-Mandrill_ServiceUnavailable.html">Mandrill_ServiceUnavailable</a></li>				<li><a href="class-Mandrill_Unknown_Export.html">Mandrill_Unknown_Export</a></li>				<li><a href="class-Mandrill_Unknown_InboundDomain.html">Mandrill_Unknown_InboundDomain</a></li>				<li><a href="class-Mandrill_Unknown_InboundRoute.html">Mandrill_Unknown_InboundRoute</a></li>				<li><a href="class-Mandrill_Unknown_IP.html">Mandrill_Unknown_IP</a></li>				<li><a href="class-Mandrill_Unknown_Message.html">Mandrill_Unknown_Message</a></li>				<li><a href="class-Mandrill_Unknown_MetadataField.html">Mandrill_Unknown_MetadataField</a></li>				<li><a href="class-Mandrill_Unknown_Pool.html">Mandrill_Unknown_Pool</a></li>				<li><a href="class-Mandrill_Unknown_Sender.html">Mandrill_Unknown_Sender</a></li>				<li><a href="class-Mandrill_Unknown_Subaccount.html">Mandrill_Unknown_Subaccount</a></li>				<li><a href="class-Mandrill_Unknown_Template.html">Mandrill_Unknown_Template</a></li>				<li><a href="class-Mandrill_Unknown_TrackingDomain.html">Mandrill_Unknown_TrackingDomain</a></li>				<li><a href="class-Mandrill_Unknown_Url.html">Mandrill_Unknown_Url</a></li>				<li><a href="class-Mandrill_Unknown_Webhook.html">Mandrill_Unknown_Webhook</a></li>				<li><a href="class-Mandrill_ValidationError.html">Mandrill_ValidationError</a></li>			</ul>		</div>	</div></div><div id="splitter"></div><div id="right"><div id="rightInner">	<form id="search">		<input type="hidden" name="cx" value="" />		<input type="hidden" name="ie" value="UTF-8" />		<input type="text" name="q" class="text" />		<input type="submit" value="Search" />	</form>	<div id="navigation">		<ul>			<li>				<a href="index.html" title="Overview"><span>Overview</span></a>			</li>			<li>				<a href="namespace-None.html" title="Summary of None"><span>Namespace</span></a>			</li>			<li class="active"><span>Class</span>			</li>		</ul>		<ul>			<li>				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>			</li>		</ul>		<ul>		</ul>	</div><div id="content" class="class">	<h1>Class Mandrill_Messages</h1>	<div class="info">										<b>Located at</b> <a href="source-class-Mandrill_Messages.html#3-406" title="Go to source code">Mandrill/Messages.php</a><br />	</div>	<table class="summary" id="methods">	<caption>Methods summary</caption>	<tr data-order="__construct" id="___construct">		<td class="attributes"><code>			 public 									</code>		</td>		<td class="name"><div>		<a class="anchor" href="#___construct">#</a>		<code><a href="source-class-Mandrill_Messages.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>		<div class="description short">					</div>		<div class="description detailed hidden">					</div>		</div></td>	</tr>	<tr data-order="send" id="_send">		<td class="attributes"><code>			 public 			array						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_send">#</a>		<code><a href="source-class-Mandrill_Messages.html#8-80" title="Go to source code">send</a>( <span>struct <var>$message</var></span>, <span>boolean <var>$async</var> = <span class="php-keyword1">false</span></span>, <span>string <var>$ip_pool</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$send_at</var> = <span class="php-keyword1">null</span></span> )</code>		<div class="description short">			<p>Send a new transactional message through Mandrill</p>		</div>		<div class="description detailed hidden">			<p>Send a new transactional message through Mandrill</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$message</var></dt>					<dd><code>struct</code><br>$message the information on the message to send - html string the full HTMLcontent to be sent - text string optional full text content to be sent - subjectstring the message subject - from_email string the sender email address. -from_name string optional from name to be used - to array an array of recipientinformation. - to[] struct a single recipient's information. - email string theemail address of the recipient - name string the optional display name to usefor the recipient - type string the header type to use for the recipient,defaults to "to" if not provided - headers struct optional extra headers to addto the message (most headers are allowed) - important boolean whether or notthis message is important, and should be delivered ahead of non-importantmessages - track_opens boolean whether or not to turn on open tracking for themessage - track_clicks boolean whether or not to turn on click tracking for themessage - auto_text boolean whether or not to automatically generate a text partfor messages that are not given text - auto_html boolean whether or not toautomatically generate an HTML part for messages that are not given HTML -inline_css boolean whether or not to automatically inline all CSS stylesprovided in the message HTML - only for HTML documents less than 256KB in size -url_strip_qs boolean whether or not to strip the query string from URLs whenaggregating tracked URL data - preserve_recipients boolean whether or not toexpose all recipients in to "To" header for each email - view_content_linkboolean set to false to remove content logging for sensitive emails -bcc_address string an optional address to receive an exact copy of eachrecipient's email - tracking_domain string a custom domain to use for trackingopens and clicks instead of mandrillapp.com - signing_domain string a customdomain to use for SPF/DKIM signing instead of mandrill (for "via" or "on behalfof" in email clients) - return_path_domain string a custom domain to use for themessages's return-path - merge boolean whether to evaluate merge tags in themessage. Will automatically be set to true if either merge_vars orglobal_merge_vars are provided. - global_merge_vars array global merge variablesto use for all recipients. You can override these per recipient. -global_merge_vars[] struct a single global merge variable - name string theglobal merge variable's name. Merge variable names are case-insensitive and maynot start with _ - content string the global merge variable's content -merge_vars array per-recipient merge variables, which override global mergevariables with the same name. - merge_vars[] struct per-recipient mergevariables - rcpt string the email address of the recipient that the mergevariables should apply to - vars array the recipient's merge variables - vars[]struct a single merge variable - name string the merge variable's name. Mergevariable names are case-insensitive and may not start with _ - content stringthe merge variable's content - tags array an array of string to tag the messagewith. Stats are accumulated using tags, though we only store the first 100 wesee, so this should not be unique or change frequently. Tags should be 50characters or less. Any tags starting with an underscore are reserved forinternal use and will cause errors. - tags[] string a single tag - must notstart with an underscore - subaccount string the unique id of a subaccount forthis message - must already exist or will fail with an error -google_analytics_domains array an array of strings indicating for which anymatching URLs will automatically have Google Analytics parameters appended totheir query string automatically. - google_analytics_campaign array|stringoptional string indicating the value to set for the utm_campaign trackingparameter. If this isn't provided the email's from address will be used instead.- metadata array metadata an associative array of user metadata. Mandrill willstore this metadata and make it available for retrieval. In addition, you canselect up to 10 metadata fields to index and make searchable using the Mandrillsearch api. - recipient_metadata array Per-recipient metadata that will overridethe global values specified in the metadata parameter. - recipient_metadata[]struct metadata for a single recipient - rcpt string the email address of therecipient that the metadata is associated with - values array an associatedarray containing the recipient's unique metadata. If a key exists in both theper-recipient metadata and the global metadata, the per-recipient metadata willbe used. - attachments array an array of supported attachments to add to themessage - attachments[] struct a single supported attachment - type string theMIME type of the attachment - name string the file name of the attachment -content string the content of the attachment as a base64-encoded string - imagesarray an array of embedded images to add to the message - images[] struct asingle embedded image - type string the MIME type of the image - must start with"image/" - name string the Content ID of the image - use <imgsrc="cid:THIS_VALUE"> to reference the image in your HTML content - contentstring the content of the image as a base64-encoded string</dd>					<dt><var>$async</var></dt>					<dd><code>boolean</code><br>$async enable a background sending mode that is optimized for bulk sending. Inasync mode, messages/send will immediately return a status of "queued" for everyrecipient. To handle rejections when sending in async mode, set up a webhook forthe 'reject' event. Defaults to false for messages with no more than 10recipients; messages with more than 10 recipients are always sentasynchronously, regardless of the value of async.</dd>					<dt><var>$ip_pool</var></dt>					<dd><code>string</code><br>$ip_pool the name of the dedicated ip pool that should be used to send themessage. If you do not have any dedicated IPs, this parameter has no effect. Ifyou specify a pool that does not exist, your default pool will be used instead.</dd>					<dt><var>$send_at</var></dt>					<dd><code>string</code><br>$send_at when this message should be sent as a UTC timestamp in YYYY-MM-DDHH:MM:SS format. If you specify a time in the past, the message will be sentimmediately. An additional fee applies for scheduled email, and this feature isonly available to accounts with a positive balance.</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>array</code><br>of structs for each recipient containing the key "email" with the email addressand "status" as either "sent", "queued", or "rejected" - return[] struct thesending results for a single recipient - email string the email address of therecipient - status string the sending status of the recipient - either "sent","queued", "scheduled", "rejected", or "invalid" - reject_reason string thereason for the rejection if the recipient status is "rejected" - _id string themessage's unique id<br />				</div>		</div>		</div></td>	</tr>	<tr data-order="sendTemplate" id="_sendTemplate">		<td class="attributes"><code>			 public 			array						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_sendTemplate">#</a>		<code><a href="source-class-Mandrill_Messages.html#82-159" title="Go to source code">sendTemplate</a>( <span>string <var>$template_name</var></span>, <span>array <var>$template_content</var></span>, <span>struct <var>$message</var></span>, <span>boolean <var>$async</var> = <span class="php-keyword1">false</span></span>, <span>string <var>$ip_pool</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$send_at</var> = <span class="php-keyword1">null</span></span> )</code>		<div class="description short">			<p>Send a new transactional message through Mandrill using a template</p>		</div>		<div class="description detailed hidden">			<p>Send a new transactional message through Mandrill using a template</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$template_name</var></dt>					<dd><code>string</code><br>$template_name the immutable name or slug of a template that exists in theuser's account. For backwards-compatibility, the template name may also be usedbut the immutable slug is preferred.</dd>					<dt><var>$template_content</var></dt>					<dd><code>array</code><br>$template_content an array of template content to send. Each item in the arrayshould be a struct with two keys - name: the name of the content block to setthe content for, and content: the actual content to put into the block -template_content[] struct the injection of a single piece of content into asingle editable region - name string the name of the mc:edit editable region toinject into - content string the content to inject</dd>					<dt><var>$message</var></dt>					<dd><code>struct</code><br>$message the other information on the message to send - same as /messages/send,but without the html content - html string optional full HTML content to be sentif not in template - text string optional full text content to be sent - subjectstring the message subject - from_email string the sender email address. -from_name string optional from name to be used - to array an array of recipientinformation. - to[] struct a single recipient's information. - email string theemail address of the recipient - name string the optional display name to usefor the recipient - type string the header type to use for the recipient,defaults to "to" if not provided - headers struct optional extra headers to addto the message (most headers are allowed) - important boolean whether or notthis message is important, and should be delivered ahead of non-importantmessages - track_opens boolean whether or not to turn on open tracking for themessage - track_clicks boolean whether or not to turn on click tracking for themessage - auto_text boolean whether or not to automatically generate a text partfor messages that are not given text - auto_html boolean whether or not toautomatically generate an HTML part for messages that are not given HTML -inline_css boolean whether or not to automatically inline all CSS stylesprovided in the message HTML - only for HTML documents less than 256KB in size -url_strip_qs boolean whether or not to strip the query string from URLs whenaggregating tracked URL data - preserve_recipients boolean whether or not toexpose all recipients in to "To" header for each email - view_content_linkboolean set to false to remove content logging for sensitive emails -bcc_address string an optional address to receive an exact copy of eachrecipient's email - tracking_domain string a custom domain to use for trackingopens and clicks instead of mandrillapp.com - signing_domain string a customdomain to use for SPF/DKIM signing instead of mandrill (for "via" or "on behalfof" in email clients) - return_path_domain string a custom domain to use for themessages's return-path - merge boolean whether to evaluate merge tags in themessage. Will automatically be set to true if either merge_vars orglobal_merge_vars are provided. - global_merge_vars array global merge variablesto use for all recipients. You can override these per recipient. -global_merge_vars[] struct a single global merge variable - name string theglobal merge variable's name. Merge variable names are case-insensitive and maynot start with _ - content string the global merge variable's content -merge_vars array per-recipient merge variables, which override global mergevariables with the same name. - merge_vars[] struct per-recipient mergevariables - rcpt string the email address of the recipient that the mergevariables should apply to - vars array the recipient's merge variables - vars[]struct a single merge variable - name string the merge variable's name. Mergevariable names are case-insensitive and may not start with _ - content stringthe merge variable's content - tags array an array of string to tag the messagewith. Stats are accumulated using tags, though we only store the first 100 wesee, so this should not be unique or change frequently. Tags should be 50characters or less. Any tags starting with an underscore are reserved forinternal use and will cause errors. - tags[] string a single tag - must notstart with an underscore - subaccount string the unique id of a subaccount forthis message - must already exist or will fail with an error -google_analytics_domains array an array of strings indicating for which anymatching URLs will automatically have Google Analytics parameters appended totheir query string automatically. - google_analytics_campaign array|stringoptional string indicating the value to set for the utm_campaign trackingparameter. If this isn't provided the email's from address will be used instead.- metadata array metadata an associative array of user metadata. Mandrill willstore this metadata and make it available for retrieval. In addition, you canselect up to 10 metadata fields to index and make searchable using the Mandrillsearch api. - recipient_metadata array Per-recipient metadata that will overridethe global values specified in the metadata parameter. - recipient_metadata[]struct metadata for a single recipient - rcpt string the email address of therecipient that the metadata is associated with - values array an associatedarray containing the recipient's unique metadata. If a key exists in both theper-recipient metadata and the global metadata, the per-recipient metadata willbe used. - attachments array an array of supported attachments to add to themessage - attachments[] struct a single supported attachment - type string theMIME type of the attachment - name string the file name of the attachment -content string the content of the attachment as a base64-encoded string - imagesarray an array of embedded images to add to the message - images[] struct asingle embedded image - type string the MIME type of the image - must start with"image/" - name string the Content ID of the image - use <imgsrc="cid:THIS_VALUE"> to reference the image in your HTML content - contentstring the content of the image as a base64-encoded string</dd>					<dt><var>$async</var></dt>					<dd><code>boolean</code><br>$async enable a background sending mode that is optimized for bulk sending. Inasync mode, messages/send will immediately return a status of "queued" for everyrecipient. To handle rejections when sending in async mode, set up a webhook forthe 'reject' event. Defaults to false for messages with no more than 10recipients; messages with more than 10 recipients are always sentasynchronously, regardless of the value of async.</dd>					<dt><var>$ip_pool</var></dt>					<dd><code>string</code><br>$ip_pool the name of the dedicated ip pool that should be used to send themessage. If you do not have any dedicated IPs, this parameter has no effect. Ifyou specify a pool that does not exist, your default pool will be used instead.</dd>					<dt><var>$send_at</var></dt>					<dd><code>string</code><br>$send_at when this message should be sent as a UTC timestamp in YYYY-MM-DDHH:MM:SS format. If you specify a time in the past, the message will be sentimmediately. An additional fee applies for scheduled email, and this feature isonly available to accounts with a positive balance.</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>array</code><br>of structs for each recipient containing the key "email" with the email addressand "status" as either "sent", "queued", "scheduled", or "rejected" - return[]struct the sending results for a single recipient - email string the emailaddress of the recipient - status string the sending status of the recipient -either "sent", "queued", "rejected", or "invalid" - reject_reason string thereason for the rejection if the recipient status is "rejected" - _id string themessage's unique id<br />				</div>		</div>		</div></td>	</tr>	<tr data-order="search" id="_search">		<td class="attributes"><code>			 public 			array						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_search">#</a>		<code><a href="source-class-Mandrill_Messages.html#161-206" title="Go to source code">search</a>( <span>string <var>$query</var> = <span class="php-quote">'*'</span></span>, <span>string <var>$date_from</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$date_to</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$tags</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$senders</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$api_keys</var> = <span class="php-keyword1">null</span></span>, <span>integer <var>$limit</var> = <span class="php-num">100</span></span> )</code>		<div class="description short">			<p>Search the content of recently sent messages and optionally narrow by daterange, tags and senders</p>		</div>		<div class="description detailed hidden">			<p>Search the content of recently sent messages and optionally narrow by daterange, tags and senders</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$query</var></dt>					<dd><code>string</code><br>$query the search terms to find matching messages for</dd>					<dt><var>$date_from</var></dt>					<dd><code>string</code><br>$date_from start date</dd>					<dt><var>$date_to</var></dt>					<dd><code>string</code><br>$date_to end date</dd>					<dt><var>$tags</var></dt>					<dd><code>array</code><br>$tags an array of tag names to narrow the search to, will return messages thatcontain ANY of the tags</dd>					<dt><var>$senders</var></dt>					<dd><code>array</code><br>$senders an array of sender addresses to narrow the search to, will returnmessages sent by ANY of the senders</dd>					<dt><var>$api_keys</var></dt>					<dd><code>array</code><br>$api_keys an array of API keys to narrow the search to, will return messagessent by ANY of the keys</dd>					<dt><var>$limit</var></dt>					<dd><code>integer</code><br>$limit the maximum number of results to return, defaults to 100, 1000 is themaximum</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>array</code><br>of structs for each matching message - return[] struct the information for asingle matching message - ts integer the Unix timestamp from when this messagewas sent - _id string the message's unique id - sender string the email addressof the sender - template string the unique name of the template used, if any -subject string the message's subject line - email string the recipient emailaddress - tags array list of tags on this message - tags[] string individual tagon this message - opens integer how many times has this message been opened -opens_detail array list of individual opens for the message - opens_detail[]struct information on an individual open - ts integer the unix timestamp fromwhen the message was opened - ip string the IP address that generated the open -location string the approximate region and country that the opening IP islocated - ua string the email client or browser data of the open - clicksinteger how many times has a link been clicked in this message - clicks_detailarray list of individual clicks for the message - clicks_detail[] structinformation on an individual click - ts integer the unix timestamp from when themessage was clicked - url string the URL that was clicked on - ip string the IPaddress that generated the click - location string the approximate region andcountry that the clicking IP is located - ua string the email client or browserdata of the click - state string sending status of this message: sent, bounced,rejected - metadata struct any custom metadata provided when the message wassent - smtp_events array a log of up to 3 smtp events for the message -smtp_events[] struct information about a specific smtp event - ts integer theUnix timestamp when the event occured - type string the message's state as aresult of this event - diag string the SMTP response from the recipient's server<br />				</div>		</div>		</div></td>	</tr>	<tr data-order="searchTimeSeries" id="_searchTimeSeries">		<td class="attributes"><code>			 public 			array						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_searchTimeSeries">#</a>		<code><a href="source-class-Mandrill_Messages.html#208-232" title="Go to source code">searchTimeSeries</a>( <span>string <var>$query</var> = <span class="php-quote">'*'</span></span>, <span>string <var>$date_from</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$date_to</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$tags</var> = <span class="php-keyword1">null</span></span>, <span>array <var>$senders</var> = <span class="php-keyword1">null</span></span> )</code>		<div class="description short">			<p>Search the content of recently sent messages and return the aggregated hourlystats for matching messages</p>		</div>		<div class="description detailed hidden">			<p>Search the content of recently sent messages and return the aggregated hourlystats for matching messages</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$query</var></dt>					<dd><code>string</code><br>$query the search terms to find matching messages for</dd>					<dt><var>$date_from</var></dt>					<dd><code>string</code><br>$date_from start date</dd>					<dt><var>$date_to</var></dt>					<dd><code>string</code><br>$date_to end date</dd>					<dt><var>$tags</var></dt>					<dd><code>array</code><br>$tags an array of tag names to narrow the search to, will return messages thatcontain ANY of the tags</dd>					<dt><var>$senders</var></dt>					<dd><code>array</code><br>$senders an array of sender addresses to narrow the search to, will returnmessages sent by ANY of the senders</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>array</code><br>the array of history information - return[] struct the stats for a single hour -time string the hour as a UTC date string in YYYY-MM-DD HH:MM:SS format - sentinteger the number of emails that were sent during the hour - hard_bouncesinteger the number of emails that hard bounced during the hour - soft_bouncesinteger the number of emails that soft bounced during the hour - rejects integerthe number of emails that were rejected during the hour - complaints integer thenumber of spam complaints received during the hour - unsubs integer the numberof unsubscribes received during the hour - opens integer the number of emailsopened during the hour - unique_opens integer the number of unique opensgenerated by messages sent during the hour - clicks integer the number oftracked URLs clicked during the hour - unique_clicks integer the number ofunique clicks generated by messages sent during the hour<br />				</div>		</div>		</div></td>	</tr>	<tr data-order="info" id="_info">		<td class="attributes"><code>			 public 			struct						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_info">#</a>		<code><a href="source-class-Mandrill_Messages.html#234-272" title="Go to source code">info</a>( <span>string <var>$id</var></span> )</code>		<div class="description short">			<p>Get the information for a single recently sent message</p>		</div>		<div class="description detailed hidden">			<p>Get the information for a single recently sent message</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$id</var></dt>					<dd><code>string</code><br>$id the unique id of the message to get - passed as the "_id" field in webhooks,send calls, or search calls</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>struct</code><br>the information for the message - ts integer the Unix timestamp from when thismessage was sent - _id string the message's unique id - sender string the emailaddress of the sender - template string the unique name of the template used, ifany - subject string the message's subject line - email string the recipientemail address - tags array list of tags on this message - tags[] stringindividual tag on this message - opens integer how many times has this messagebeen opened - opens_detail array list of individual opens for the message -opens_detail[] struct information on an individual open - ts integer the unixtimestamp from when the message was opened - ip string the IP address thatgenerated the open - location string the approximate region and country that theopening IP is located - ua string the email client or browser data of the open -clicks integer how many times has a link been clicked in this message -clicks_detail array list of individual clicks for the message - clicks_detail[]struct information on an individual click - ts integer the unix timestamp fromwhen the message was clicked - url string the URL that was clicked on - ipstring the IP address that generated the click - location string the approximateregion and country that the clicking IP is located - ua string the email clientor browser data of the click - state string sending status of this message:sent, bounced, rejected - metadata struct any custom metadata provided when themessage was sent - smtp_events array a log of up to 3 smtp events for themessage - smtp_events[] struct information about a specific smtp event - tsinteger the Unix timestamp when the event occured - type string the message'sstate as a result of this event - diag string the SMTP response from therecipient's server<br />				</div>		</div>		</div></td>	</tr>	<tr data-order="content" id="_content">		<td class="attributes"><code>			 public 			struct						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_content">#</a>		<code><a href="source-class-Mandrill_Messages.html#274-300" title="Go to source code">content</a>( <span>string <var>$id</var></span> )</code>		<div class="description short">			<p>Get the full content of a recently sent message</p>		</div>		<div class="description detailed hidden">			<p>Get the full content of a recently sent message</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$id</var></dt>					<dd><code>string</code><br>$id the unique id of the message to get - passed as the "_id" field in webhooks,send calls, or search calls</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>struct</code><br>the content of the message - ts integer the Unix timestamp from when thismessage was sent - _id string the message's unique id - from_email string theemail address of the sender - from_name string the alias of the sender (if any)- subject string the message's subject line - to struct the message recipient'sinformation - email string the email address of the recipient - name string thealias of the recipient (if any) - tags array list of tags on this message -tags[] string individual tag on this message - headers struct the key-valuepairs of the custom MIME headers for the message's main document - text stringthe text part of the message, if any - html string the HTML part of the message,if any - attachments array an array of any attachments that can be found in themessage - attachments[] struct information about an individual attachment - namestring the file name of the attachment - type string the MIME type of theattachment - content string the content of the attachment as a base64 encodedstring<br />				</div>		</div>		</div></td>	</tr>	<tr data-order="parse" id="_parse">		<td class="attributes"><code>			 public 			struct						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_parse">#</a>		<code><a href="source-class-Mandrill_Messages.html#302-331" title="Go to source code">parse</a>( <span>string <var>$raw_message</var></span> )</code>		<div class="description short">			<p>Parse the full MIME document for an email message, returning the content ofthe message broken into its constituent pieces</p>		</div>		<div class="description detailed hidden">			<p>Parse the full MIME document for an email message, returning the content ofthe message broken into its constituent pieces</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$raw_message</var></dt>					<dd><code>string</code><br>$raw_message the full MIME document of an email message</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>struct</code><br>the parsed message - subject string the subject of the message - from_emailstring the email address of the sender - from_name string the alias of thesender (if any) - to array an array of any recipients in the message - to[]struct the information on a single recipient - email string the email address ofthe recipient - name string the alias of the recipient (if any) - headers structthe key-value pairs of the MIME headers for the message's main document - textstring the text part of the message, if any - html string the HTML part of themessage, if any - attachments array an array of any attachments that can befound in the message - attachments[] struct information about an individualattachment - name string the file name of the attachment - type string the MIMEtype of the attachment - binary boolean if this is set to true, the attachmentis not pure-text, and the content will be base64 encoded - content string thecontent of the attachment as a text string or a base64 encoded string based onthe attachment type - images array an array of any embedded images that can befound in the message - images[] struct information about an individual image -name string the Content-ID of the embedded image - type string the MIME type ofthe image - content string the content of the image as a base64 encoded string<br />				</div>		</div>		</div></td>	</tr>	<tr data-order="sendRaw" id="_sendRaw">		<td class="attributes"><code>			 public 			array						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_sendRaw">#</a>		<code><a href="source-class-Mandrill_Messages.html#333-354" title="Go to source code">sendRaw</a>( <span>string <var>$raw_message</var></span>, <span>string|null <var>$from_email</var> = <span class="php-keyword1">null</span></span>, <span>string|null <var>$from_name</var> = <span class="php-keyword1">null</span></span>, <span>array|null <var>$to</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$async</var> = <span class="php-keyword1">false</span></span>, <span>string <var>$ip_pool</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$send_at</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$return_path_domain</var> = <span class="php-keyword1">null</span></span> )</code>		<div class="description short">			<p>Take a raw MIME document for a message, and send it exactly as if it weresent through Mandrill's SMTP servers</p>		</div>		<div class="description detailed hidden">			<p>Take a raw MIME document for a message, and send it exactly as if it weresent through Mandrill's SMTP servers</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$raw_message</var></dt>					<dd><code>string</code><br>$raw_message the full MIME document of an email message</dd>					<dt><var>$from_email</var></dt>					<dd><code>string|null</code><br>$from_email optionally define the sender address - otherwise we'll use theaddress found in the provided headers</dd>					<dt><var>$from_name</var></dt>					<dd><code>string|null</code><br>$from_name optionally define the sender alias</dd>					<dt><var>$to</var></dt>					<dd><code>array|null</code><br>$to optionally define the recipients to receive the message - otherwise we'lluse the To, Cc, and Bcc headers provided in the document - to[] string the emailaddress of the recipient</dd>					<dt><var>$async</var></dt>					<dd><code>boolean</code><br>$async enable a background sending mode that is optimized for bulk sending. Inasync mode, messages/sendRaw will immediately return a status of "queued" forevery recipient. To handle rejections when sending in async mode, set up awebhook for the 'reject' event. Defaults to false for messages with no more than10 recipients; messages with more than 10 recipients are always sentasynchronously, regardless of the value of async.</dd>					<dt><var>$ip_pool</var></dt>					<dd><code>string</code><br>$ip_pool the name of the dedicated ip pool that should be used to send themessage. If you do not have any dedicated IPs, this parameter has no effect. Ifyou specify a pool that does not exist, your default pool will be used instead.</dd>					<dt><var>$send_at</var></dt>					<dd><code>string</code><br>$send_at when this message should be sent as a UTC timestamp in YYYY-MM-DDHH:MM:SS format. If you specify a time in the past, the message will be sentimmediately.</dd>					<dt><var>$return_path_domain</var></dt>					<dd><code>string</code><br>$return_path_domain a custom domain to use for the messages's return-path</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>array</code><br>of structs for each recipient containing the key "email" with the email addressand "status" as either "sent", "queued", or "rejected" - return[] struct thesending results for a single recipient - email string the email address of therecipient - status string the sending status of the recipient - either "sent","queued", "scheduled", "rejected", or "invalid" - reject_reason string thereason for the rejection if the recipient status is "rejected" - _id string themessage's unique id<br />				</div>		</div>		</div></td>	</tr>	<tr data-order="listScheduled" id="_listScheduled">		<td class="attributes"><code>			 public 			array						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_listScheduled">#</a>		<code><a href="source-class-Mandrill_Messages.html#356-371" title="Go to source code">listScheduled</a>( <span>string <var>$to</var> = <span class="php-keyword1">null</span></span> )</code>		<div class="description short">			<p>Queries your scheduled emails by sender or recipient, or both.</p>		</div>		<div class="description detailed hidden">			<p>Queries your scheduled emails by sender or recipient, or both.</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$to</var></dt>					<dd><code>string</code><br>$to an optional recipient address to restrict results to</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>array</code><br>a list of up to 1000 scheduled emails - return[] struct a scheduled email - _idstring the scheduled message id - created_at string the UTC timestamp when themessage was created, in YYYY-MM-DD HH:MM:SS format - send_at string the UTCtimestamp when the message will be sent, in YYYY-MM-DD HH:MM:SS format -from_email string the email's sender address - to string the email's recipient -subject string the email's subject<br />				</div>		</div>		</div></td>	</tr>	<tr data-order="cancelScheduled" id="_cancelScheduled">		<td class="attributes"><code>			 public 			struct						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_cancelScheduled">#</a>		<code><a href="source-class-Mandrill_Messages.html#373-387" title="Go to source code">cancelScheduled</a>( <span>string <var>$id</var></span> )</code>		<div class="description short">			<p>Cancels a scheduled email.</p>		</div>		<div class="description detailed hidden">			<p>Cancels a scheduled email.</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$id</var></dt>					<dd><code>string</code><br>$id a scheduled email id, as returned by any of the messages/send calls ormessages/list-scheduled</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>struct</code><br>information about the scheduled email that was cancelled. - _id string thescheduled message id - created_at string the UTC timestamp when the message wascreated, in YYYY-MM-DD HH:MM:SS format - send_at string the UTC timestamp whenthe message will be sent, in YYYY-MM-DD HH:MM:SS format - from_email string theemail's sender address - to string the email's recipient - subject string theemail's subject<br />				</div>		</div>		</div></td>	</tr>	<tr data-order="reschedule" id="_reschedule">		<td class="attributes"><code>			 public 			struct						</code>		</td>		<td class="name"><div>		<a class="anchor" href="#_reschedule">#</a>		<code><a href="source-class-Mandrill_Messages.html#389-404" title="Go to source code">reschedule</a>( <span>string <var>$id</var></span>, <span>string <var>$send_at</var></span> )</code>		<div class="description short">			<p>Reschedules a scheduled email.</p>		</div>		<div class="description detailed hidden">			<p>Reschedules a scheduled email.</p>				<h4>Parameters</h4>				<div class="list"><dl>					<dt><var>$id</var></dt>					<dd><code>string</code><br>$id a scheduled email id, as returned by any of the messages/send calls ormessages/list-scheduled</dd>					<dt><var>$send_at</var></dt>					<dd><code>string</code><br>$send_at the new UTC timestamp when the message should sent. Mandrill can't timetravel, so if you specify a time in past the message will be sent immediately</dd>				</dl></div>				<h4>Returns</h4>				<div class="list">					<code>struct</code><br>information about the scheduled email that was rescheduled. - _id string thescheduled message id - created_at string the UTC timestamp when the message wascreated, in YYYY-MM-DD HH:MM:SS format - send_at string the UTC timestamp whenthe message will be sent, in YYYY-MM-DD HH:MM:SS format - from_email string theemail's sender address - to string the email's recipient - subject string theemail's subject<br />				</div>		</div>		</div></td>	</tr>	</table></div>	<div id="footer">		 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>	</div></div></div></body></html>
 |