I basically have a regular php mail script function that should run so often with a cron job, however some emails don't work when they really work if I run the script manually.
for example, in my hoshing cron control panel, I enter domain.ca/pear/Mail/test_mail.php
I do not enter the URL correctly? Should I use some kind of cron job command
require_once('Mail.php');
require_once('../Mail_Mime/mime.php');
$mail = Mail::factory("mail");
$headers = array("From"=>"me@example.com", "Subject"=>"Test Mail");
$body = "This is a test!";
$mail->send("example@gmail.com", $headers, $body);
This is exactly my script email address
In addition, cron works with specific email addresses, such as gmail.
So emails like my schools don't work in cron, but work when they are done manually. In addition, the script updates the database using cron ..
I have this in my .sh file:
/usr/local/nf/php5/bin/php -f ./test_mail.php