When running a PHP script from cron, you must run it through the php binary. When you view a PHP script in your web browser, the web server hosting the PHP file does that for you automagically.
You will definitely want to add some kind of access control to that mail script.
Use a .htaccess file in the directory to block out unauthorized users. That won't affect scripts run from a cron job or shell.
If you wanted to use a cron job to hit a page via the web server, I wouldn't use lynx - lynx is great for interactive use but for this sort of thing I'd go with curl or wget.
Recent comments
1 day 2 hours ago
1 day 7 hours ago
1 day 12 hours ago
1 day 13 hours ago
2 days 4 hours ago
2 days 4 hours ago
2 days 9 hours ago
2 days 15 hours ago
2 days 16 hours ago
2 days 17 hours ago