\Hpolthof\DocmailDocmailService

Class DocmailService

Summary

Methods
Properties
Constants
__construct()
send()
deleteMailing()
sendFile()
sendData()
getMailingGUID()
getOrderRef()
getBalance()
getProofFile()
getMailing()
setMailing()
addAddress()
addBasicAddress()
getAddresses()
getTemplate()
setTemplate()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() 

send()

send() : boolean

Submit the mailing to the Docmail server.

Throws

\Hpolthof\Docmail\DocmailException

Returns

boolean

deleteMailing()

deleteMailing(  $MailingGUID) 

Delete a mailing by GUID.

Parameters

$MailingGUID

Throws

\Hpolthof\Docmail\DocmailException

sendFile()

sendFile(  $filename, \Closure  $handler) : \Hpolthof\Docmail\DocmailService|null

Send a file through Docmail with a in a closure configured service object.

Parameters

$filename
\Closure $handler

Throws

\Hpolthof\Docmail\DocmailException

Returns

\Hpolthof\Docmail\DocmailService|null

sendData()

sendData(  $filename,   $data, \Closure  $handler) : \Hpolthof\Docmail\DocmailService|null

Send a file using a data string through Docmail with a in a closure configured service object.

Parameters

$filename
$data
\Closure $handler

Throws

\Hpolthof\Docmail\DocmailException

Returns

\Hpolthof\Docmail\DocmailService|null

getMailingGUID()

getMailingGUID() : string|null

Get the Unique GUID Docmail generated for API purposes.

Returns

string|null

getOrderRef()

getOrderRef() : string|null

Get the Order Reference Docmail assigned to the mailing.

Returns

string|null

getBalance()

getBalance() : float

Get your current credit or allowed limit, based on your account type.

Throws

\Hpolthof\Docmail\DocmailException

Returns

float

getProofFile()

getProofFile() : null|string

If the order is processed this function will return the content of the Proof PDF File.

Keep in mind that after sending a mailing the servers need a few seconds to one minute to process the mailing. Be advised to queue a job for the retrieval of the Proof PDF.

Returns

null|string

setMailing()

setMailing(mixed  $mailing) : $this

Parameters

mixed $mailing

Returns

$this

addAddress()

addAddress(\Hpolthof\Docmail\DocmailAddress  $address) : $this

Add an address using the DocmailAddress.

Parameters

\Hpolthof\Docmail\DocmailAddress $address

Returns

$this

addBasicAddress()

addBasicAddress(string  $fullname, string  $address1, string  $address2, string  $address3 = '', string  $address4 = '') : \Hpolthof\Docmail\DocmailService

Add an address using basic address information.

Parameters

string $fullname
string $address1
string $address2
string $address3
string $address4

Returns

\Hpolthof\Docmail\DocmailService