Hi
I am using PHP to develop a web application. I want to send a mail report automatically from the server, without any user interaction. I tried in cron but not properly worked in my application. Is there any other way to send aoutomatic mail from server. Any one can help pls..

Cron should work just fine. Did you have problems setting it up ?

Are you using mail() or did you use SMTP authentication?

I have a shared web host server. I don't have any idea about how to work cron in this server

I am using SMTP authentication for mail sending.

Most shared host allow cron jobs through cPanel or the likes. Am sure your host would have it documented on their website.

thnk u

I create cron job in ubuntu. But this is not working. How to I create cron job in ubuntu ?
Pls help me...

Can you show what you've tried ?

I save the following code as crontab.txt in etc/cron.daily folder.

MAILTO=example@gmail.com
1 * * * * * /opt/lampp/htdocs/rep_mail.php

But the page is not working

php is missing, see here.

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.