Hi there..
i created a cronjob on my webserver wich calls a file named "cronjob.php".
In this file I run these lines of code:
PHP Code:
$emailsend = "me@my-email-adres.com";
$subject = "Test CronTab";
$recipient1 = "someone@his-email-adres.com";
$headers = "From: Me <$emailsend>\n";
$headers .= "X-Sender: <$emailsend>\n";
$headers .= "X-Mailer: PHP\n";
$headers .= "Return-Path: Me <$emailsend>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$message = "
<html>
<head><meta content=\"MSHTML 6.00.2900.3132\" name=\"GENERATOR\"></head>
<body bgcolor=\"#ffffff\"><center>crontab testing.</center></body>
</html>";
mail($recipient1, $subject, $message, $headers);
The cronjob settings are good and the "script" is running. But the PHP script
is not executed. I got these errors:
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 3: =: command not found
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 4: =: command not found
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 6: =: command not found
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 10: =: command not found
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 11: .=: command not found
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 12: .=: command not found
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 13: .=: command not found
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 14: .=: command not found
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 15: .=: command not found
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 17: =: command not found
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 29: syntax error near unexpected token `$recipient1,'
/var/www/vhosts/my-site.nl/httpdocs/cronjob.php: line 29: `mail($recipient1, $subject, $message, $headers);'
where did I go wrong?
_j