ActiveCampaign / postmark-php

The official PHP library for Postmark.

Home Page:https://postmarkapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sending Attachments. Error in examples.

mellowpixel opened this issue · comments

Hi! Just to let you know, that you have a small error in "Sending Attachments example"
The Function sendEmail missing one NULL argument before true:

$sendResult = $client->sendEmail('sender@example.com', 'recipient@example.com', "Hello from the PHP Postmark Client Tests! ($currentTime)", '<b>Hi there!</b>', 'This is a text body for a test email.', NULL, true, NULL, NULL, NULL, NULL, [$attachment]);
this way function will throw an error.

Check the sendEmail function declaration:
sendEmail($from, $to, $subject, $htmlBody = NULL, $textBody = NULL, $tag = NULL, $trackOpens = true, $replyTo = NULL, $cc = NULL, $bcc = NULL, $headers = NULL, $attachments = NULL, $trackLinks = NULL)

Regards!