PHP code example of bespoke-support / postmark-inbound
1. Go to this page and download the library: Download bespoke-support/postmark-inbound library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bespoke-support / postmark-inbound example snippets
$inbound = new \BespokeSupport\PostmarkInbound\PostmarkInbound(file_get_contents('php://input'));
$inbound->Subject;
$inbound->Subject();
$inbound->FromEmail();
$inbound->FromFull();
$inbound->FromName();
$inbound->Date();
$inbound->OriginalRecipient();
$inbound->ReplyTo();
$inbound->MailboxHash();
$inbound->Tag();
$inbound->MessageID();
$inbound->TextBody();
$inbound->HtmlBody();
$inbound->StrippedTextReply();
$inbound->HasAttachments();
foreach ($inbound->Attachments() as $attachment) {
$attachment->Name;
$attachment->ContentType;
$attachment->ContentLength;
$attachment->Download('/');
}
foreach ($inbound->Recipients() as $recipient) {
$recipient->Name;
$recipient->Email;
}
foreach ($inbound->UndisclosedRecipients() as $undisclosedRecipient) {
$undisclosedRecipient->Name;
$undisclosedRecipient->Email;
}