I am trying to send a email using postmarkapp api in php, I have managed to get it to send plain emails. I have uploaded the class to the same directory as index.php but the 'use' function seems to give me a error which is out of my knowledge.
Error:
Parse error: syntax error, unexpected '.', expecting identifier (T_STRING) in /public_html/index.php on line 5
Index.php
// Import the Postmark Client Class.
use Postmark\Models\PostmarkAttachment;
use Postmark\PostmarkClient\.php;
// Create Client
$client = new PostmarkClient("MY API KEY - CENSORED");
// Make a request
$sendResult = $client->sendEmailWithTemplate(
"sender@example.com",
"recipient@example.com",
TEMPLATEID-CENSORED,
[
"product_name" => "product_name_Value",
"name" => "name_Value",
"action_url" => "action_url_Value",
"username" => "username_Value",
"sender_name" => "sender_name_Value",
"product_address_line1" => "product_address_line1_Value",
"product_address_line2" => "product_address_line2_Value",
]);
Same directory Postmark/ I have this class (official class)
https://github.com/wildbit/postmark-php/tree/master/src/Postmark
Thanks for taking the time to read, greatly appreciated.