Operating System - HP-UX
1833883 Members
2121 Online
110063 Solutions
New Discussion

send mail via mailx at given time

 
SOLVED
Go to solution
Paolo Gilli
Frequent Advisor

send mail via mailx at given time

using mailx, is possible send the mail at given time?
For example, if I compose a mailx message at 2.00pm, exists a parameter to send the message at 5pm?

Thankyou
Paolo
2 REPLIES 2
Simon Hargrave
Honored Contributor
Solution

Re: send mail via mailx at given time

Schedule it via the "at" command.

First make sure you user ID is in the file /var/adm/cron/at.allow, so that you are allowed to use at.

Then do something like: -

at 1700
cat mail.txt | mailx -s "test mail" fred@home.com
^D

(The ^D is pressing Control-D to end the script).

This will then run at 1700 hours.
Steven E. Protter
Exalted Contributor

Re: send mail via mailx at given time

If you want the message every day, use the same syntax in cron.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com