Hi, this is my first post to the forum.

I am trying to use HTML Mime Mail, a class written by Richard Heyes.

I use the new class in this program:

<?php
    require_once("/htdocs/htmlMimeMail5/htmlMimeMail5.php"); 
    $mail = new htmlMimemail5();
    $mail->setFrom("example@yahoo.com");
    $mail->setReturnPath("example@yahoo.com");
    $mail->setSubject("Test HTML Mime Mail");
    $mail->setText("This is the body of the test e-mail.");
    $mail->send(array("example@hotmail.com"));
?>

But I keep getting this error: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in htmlMimeMail5.php in line 23 On line 23 of the php file I just downloaded, I find this: private $html; I tried to delete that line and then of course I got the same error message, but now for the next line: private $text; I did not introduce any changes in the downloaded file.

Any clue?

Thanks!

Recommended Answers

All 3 Replies

I am a newbie at PHP and I have never used any classes before. Maybe I am including the php-file with the new class the wrong way?

maybe you are using a script designed to work with PHP5 and you are still using PHP4?

maybe you are using a script designed to work with PHP5 and you are still using PHP4?

I'll check which PHP-version my web-host is using. It might be 4.

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.