PHP code example of camelcased / postmark-inbound-laravel
1. Go to this page and download the library: Download camelcased/postmark-inbound-laravel 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/ */
camelcased / postmark-inbound-laravel example snippets
PostmarkEmail::from();
PostmarkEmail::to();
PostmarkEmail::body(); // Auto-detects if message contains html or text only.
PostmarkEmail::bodyIsText();
PostmarkEmail::bodyIsHtml();
PostmarkEmail::subject();
PostmarkEmail::replyTo();
PostmarkEmail::cc(); // Returns array if more than one. Ex: ['[email protected]', '[email protected]']. Returns string if only one.
PostamrkEmail::bcc(); // Returns same as cc;
PostmarkEmail::hasAttachments() // Returns true or false
PostmarkEmail::attachments(); // Returns array of attachments
if (PostmarkEmail::hasAttachments())
{
$attachments = PostmarkEmail::attachments();
foreach ($attachments as $attachment) {
$attachment->Name();
$attachment->Content(); // Returns base64 encoded string
$attachment->DecodedContent(); // Returns decoded value
$attachment->Type(); // Or use $attachment->MIME()
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.