error WA_Email.php on line 6
testing the email on a contact page and getting the following error
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in ..\webassist\email\WA_Email.php on line 6
created a blank PHP and getting the same ?
test.php
===================================================================================
<?php require_once("../webassist/email/WA_Email.php"); ?>
<?php
if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)) { //WA Universal Email
$Email = new WA_Email("test1");
$Email->Redirect = "../index.htm";
$Email->From = "website@mydomain.co.uk";
$Email->addTo("test@mydomain.co.uk");
$Email->BodyFile = "../webassist/email/templates/WebAssist-Block/Block.php";
if (function_exists("rel2abs") && $Email->Redirect) $Email->Redirect = $Email->Redirect?rel2abs($Email->Redirect,dirname(__FILE__)):"";
for ($emailGroup=0; $emailGroup<sizeof($Email->To); $emailGroup++) {
$Email->Subject = "test-email";
$Email->send($emailGroup);
}
$Email->close();
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<form action="" method="post" name="test" lang="en">
<input name="testfield" type="text" value="testfield" size="50">
<input name="submit" type="button">
</form>
</body>
</html>
WA-Email.php
===================================================================================
ln6 use PHPMailer\PHPMailer\PHPMailer;
ln7 use PHPMailer\PHPMailer\Exception;
directory structure - not sure if the above are directory links or if these are linked to a remote site ?:
webassist\email\phpmailer\src\PHPMailer.php
webassist\email\phpmailer\src\Exception.php