View Full Version : schedule email via cron and PHP?

01-17-2004, 04:29 AM
Hi All,
I've been trying to complete a task that in theory seen simple, but havent been able to make anything work. Here is what i'm trying to do;

I host a few mailing lists for a government office in the town i live, and would like to backup the subscriber lists once or twice a week via email command to my mailing list manager which is EZMLM that is built into the H-Sphere control panel that i use. The command to retrieve the list is listname-list@domain.com . Once submitted, the list of subscribers is sent to my email box. What i want to accomplish is creating a php script/file that can be scheduled via cron to send an email to the list address above and appear that its coming from my personal address to the response is sent only to me. Does anyone have any suggestions on how to accomplish this? I tried the mail() function but was unsuccessfully. Any help will be greatly appreciated

Tony D.

01-18-2004, 05:45 AM
did you set any headers when sending the mail ? , if not its worth a try else the list server may not know who to reply to.

$headers = "From: you@yourdomain.com\n";
$headers .= "Reply-To: you@yourdomain.com\n";

'check what you need if anything as the subject line',
'or indeed in the body',