@MindzaiSep 16.2009 — #Is it definitely only sending 1 mail? Are you sure it isn't queuing mails? There are various options for queueing and limiting mails in the /etc/mail/sendmail.conf and /etc/mail/sendmail.mc files so it might be worth having a poke around. Note you need to use the m4 program to apply changes to the mc file though.
@stephan_gerlachauthorSep 16.2009 — #I realised now that this is not the only problem. So currently it is sending only 1 email per minute and they also are being sent more than once.
I can't find anything in those 2 files but then I am not entirely sure on what I have to look for.
@stephan_gerlachauthorSep 17.2009 — #I also just realised that if it sends only loads of emails when the script is started via cronjob. If I run the script via the browser each email is sent only once.
@MindzaiSep 17.2009 — #But still only one per minute? Maybe the problem lies in either your script or the crontab setting (or both?). Can you post them?
$sql_u = 'SELECT * FROM users WHERE id='.$user.' LIMIT 1'; $query_u = mysql_query($sql_u); $result_u = mysql_fetch_assoc($query_u);
$sql= 'SELECT * FROM client,notes WHERE notes.user='.$user.' AND notes.date LIKE "'.date('Y-m-d',strtotime('-'.$day_minus.' day')).'%" AND notes.client = client.id ORDER BY client.company_name ASC';