src/Web/Service.php
public function emailInvoiceAsPdf($token, $invoiceType, array $emailAsPdf, $invoiceNotes = '')
    {
        $message = array(
            'token' => (string) $token,
            'invoicetype' => (int) $invoiceType,
            'emailaspdf' => $emailAsPdf,
        );
        if (!empty($invoiceNotes)) {
            $message['invoicenotes'] = (string) $invoiceNotes;
        }
        return $this->communicator->callApiFunction('invoices/invoice_mail', $message)->setMainResponseKey('invoice');
    }
public function emailInvoiceAsPdf($token, $invoiceType, array $emailAsPdf, $invoiceNotes = '')
    {
        $message = array(
            'token' => (string) $token,
            'invoicetype' => (int) $invoiceType,
            'emailaspdf' => $emailAsPdf,
        );
        if (!empty($invoiceNotes)) {
            $message['invoicenotes'] = (string) $invoiceNotes;
        }
        return $this->communicator->callApiFunction('invoices/invoice_mail', $message)->setMainResponseKey('invoice');
    }
public function emailInvoiceAsPdf ( $ token , $ invoiceType , array $ emailAsPdf , $ invoiceNotes = '' ) { $ message = array ( 'token' => ( string ) $ token , 'invoicetype' => ( int ) $ invoiceType , 'emailaspdf' => $ emailAsPdf , ) ; if ( ! empty ( $ invoiceNotes ) ) { $ message [ 'invoicenotes' ] = ( string ) $ invoiceNotes ; } return $ this -> communicator -> callApiFunction ( 'invoices/invoice_mail' , $ message ) -> setMainResponseKey ( 'invoice' ) ; }
Sends out an invoice or reminder as PDF.

@param string $token
The token for the invoice.
@param int $invoiceType
One of the constants API::Email_Normal or API::Email_Reminder.
@param array $emailAsPdf
An array with the fields:
- emailto
- emailbcc
- emailfrom
- subject
- message
- confirmreading
@param string $invoiceNotes
Multiline field for additional remarks. Use \n for newlines and \t for
tabs. Contents is placed in notes/comments section of the invoice.
Content will not appear on the actual invoice or associated emails.

@return \Siel\Acumulus\Web\Result
The result of the webservice call. The structured response will contain
1 "invoice" array, being a keyed array with keys:
- token
- invoicetype
Possible errors/warnings:
- "GK6FKHU52: Incorrect invoicetype value used (9) in invoicetype tag
as part of invoice section in the XML. Using default value of 0
normal."
- "TNFE4035G: Requested token not found or invalid token supplied.
Unable to proceed."

@see https://siel.nl/acumulus/API/Invoicing/Email/
Sends out an invoice or reminder as PDF .