How would you make the message (aka "email entity," I presume) persist from the time you create it until time to send it, unless you save it somewhere?
Perl has magic and Magic, but is still slow at "the inconceivable." | [reply] |
| [reply] |
at now +5h send_message.sh
# or
at teatime send_message.sh
I think that even windows has an at command ;)
| [reply] [d/l] |
Thanks for your responses!
Ww, im not sure how Outlook does it. I was hoping that i could give my message (ie "email entity" %-) ) to the mail server and tell it to hold it until specified datetime. I was hoping that the server would store it until the later date, not that i would store it till i want to send it.
Ken, i thought of sleeping too, but unfortunately it isnt a good idea in this case, i think. The script would need to be run every time i want to send a delayed message, and if the previous instance of the script is sleeping it would create a 2nd running instance. Then the 3rd, 4th etc etc. It makes me wary to have so many sleeping scripts. Besides, if the server needs to be restarted (which does not happen often, but enough to take it into consideration), all those emails will be lost. | [reply] |
Is the mailserver yours (and yours exclusively)?
This would still be storing the message "somewhere" -- which you excluded in your OP -- but if you own the mailserver, it should not be all that hard to modify your existing code (or code in Mail::Sendmail to interpose a delay between creation and transmission. Just for example, countdown timers are a well-established, well-documented, and simple technology.
| [reply] |
| [reply] |
Ww, the mail server isnt mine and i have no admin access to it, but i like your train of thought!
Richard, thanks for the tip!! I did not know about the "at" command. I'm gonna explore this approach. | [reply] |