Author |
Message |
billdavies
Senior WebHelper


Joined: 22 Jan 2002
Posts: 107
Location: UK
|
Posted:
Sun Nov 03, 2002 6:44 pm (22 years, 5 months ago) |
  |
Hey,
Does anybody know how I can set up an email to be sent at a certain time without having the computer on etc? I can be a web-based service if you cannot do it in Outlook Express.
Thanks
Bill |
|
|
      |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun Nov 03, 2002 6:57 pm (22 years, 5 months ago) |
  |
Yes, this can be done with a small PHP script and a cron task. Where are you hosted?
The PHP script would be like this:
Code: | mail("toaddress", "subject", "message", "From:fromname <fromaddress>"); |
|
________________________________
 |
|
    |
 |
billdavies
Senior WebHelper


Joined: 22 Jan 2002
Posts: 107
Location: UK
|
Posted:
Sun Nov 03, 2002 8:16 pm (22 years, 5 months ago) |
  |
I am with Slabhost and it uses XP Control Panel or whatever it is called. Under Cron Jobs is has some gumph then:
Minute Hour Day Month Weekday Command
I want to send an email to about 10 people in one go.
It also says "no crontab" do I need to get that sorted as I'm sure its meant to have it. |
|
|
      |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun Nov 03, 2002 8:46 pm (22 years, 5 months ago) |
  |
Code: | mail("toaddress, toaddress2, etc...", "subject", "message", "From:fromname <fromaddress>"); |
is the code you need in your PHP file
As to the crontab, here it is:
command: /usr/local/bin/lynx --dump http://www.site.com/urltophpscript/
You'll have to tell me when you want it to run for me to tell you what to put in the other boxes. |
________________________________
 |
|
    |
 |
billdavies
Senior WebHelper


Joined: 22 Jan 2002
Posts: 107
Location: UK
|
Posted:
Sun Nov 03, 2002 9:39 pm (22 years, 5 months ago) |
  |
Huh? Sorry, I know nothing! Do I need to use the crontab with this or something or were you just telling me?! What does all of that mean?!
Sorry for being a pain.
Bill |
|
|
      |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Nov 04, 2002 5:12 pm (22 years, 5 months ago) |
  |
That is the command you enter in your control panel, and that is the command which will be run periodically (it is a crontab). However, you need to tell me when you want it run... |
________________________________
 |
|
    |
 |
billdavies
Senior WebHelper


Joined: 22 Jan 2002
Posts: 107
Location: UK
|
Posted:
Mon Nov 04, 2002 6:17 pm (22 years, 5 months ago) |
  |
Ummm, well I have found that it is in Eastern Time so lets say 1am.
Does anyone know if its possible to set a post to be posted at x on a phpBB forum?
Thirdly, are there any good tutorials in cron jobs?
Bill |
|
|
      |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Nov 04, 2002 7:22 pm (22 years, 5 months ago) |
  |
I take it you mean 1 am daily?
No, that's not really possible (well, it is, but require an extensive script to be written).
I don't know of many, but, as always, Google is your friend
Here is the stuff for the crontab:
In the first box, put: 0
In the second box: 1
In all the others: *
In the last one, the longest: /usr/local/bin/lynx --dump http://www.site.com/urltophpscript/
Of course, you have to create the PHP script which is going to be run at 1 am (code above). |
________________________________
 |
|
    |
 |
adam
Forum Moderator & Developer

Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Mon Nov 04, 2002 7:57 pm (22 years, 5 months ago) |
  |
you sure about it not being possible, daniel? surely entering 01 in the hour field and * in the others (appart from the command, of course) would make it run at 1am daily? |
________________________________ It's turtles all the way down... |
|
     |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Nov 04, 2002 7:58 pm (22 years, 5 months ago) |
  |
I was talking about inserting a phpBB post not being possible...  |
________________________________
 |
|
    |
 |
adam
Forum Moderator & Developer

Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Mon Nov 04, 2002 8:00 pm (22 years, 5 months ago) |
  |
Daniel wrote: | I was talking about inserting a phpBB post not being possible...  | ahh, yes, Daniel, the master of replying in record time
it should be possible, just send lynx to the appropriate url...not sure why you would want to though, appart to spam... |
________________________________ It's turtles all the way down... |
|
     |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Nov 04, 2002 8:05 pm (22 years, 5 months ago) |
  |
Ummm.... you can't specify all the post's input fields through GET! You crazy?
Quote: | ahh, yes, Daniel, the master of replying in record time |
All I have to do is open up my browser and click one button (of course wait half a second for the page to load) to see if there any new posts at 4WebHelp. (Not to mention the notification emails I get ) |
________________________________
 |
|
    |
 |
adam
Forum Moderator & Developer

Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Mon Nov 04, 2002 8:16 pm (22 years, 5 months ago) |
  |
/me loves get, it's his friend
if it's in a cron job, you only have to type it once...so it's not THAT bad...
anyway, my point is that it's POSSIBLE :p |
________________________________ It's turtles all the way down... |
|
     |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Nov 04, 2002 8:20 pm (22 years, 5 months ago) |
  |
Well... maybe NOT (at least not without modification of phpBB), because I don't think phpBB allows GET posting - helps prevent spamming
Now, adam, say sorry to Bill for hijacking his thread  |
________________________________
 |
|
    |
 |
adam
Forum Moderator & Developer

Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Mon Nov 04, 2002 8:22 pm (22 years, 5 months ago) |
  |
/me hangs his head in shame...
sorry  |
________________________________ It's turtles all the way down... |
|
     |
 |
|