You are not logged in.

#1 2009-12-29 15:09:41

Chokkan
Member
Registered: 2009-04-06
Posts: 129

Automatic New Year mails?

I had a thought about sending a bunch of e-mails at exactly midnight on Friday/Saturday. I thought it might also be a good way to learn more about *nix/Arch. Thanks to the wiki entry on smtp, I managed to send mail from the command line. I was then going to use cron to send the mails at the right time. I have friends who live outside of my timezone, so I made a few textfiles with their details and a message, as described in the wiki.

I have three questions:
1) Does my crontab look OK?

0 0 1 1 * alex ssmtp me@gmail.com < /home/alex/.bin/newyearmail.txt 
0 9 1 1 * alex ssmtp me@gmail.com < /home/alex/.bin/newyearmail-uk.txt
0 14 1 1 * alex ssmtp me@gmail.com < /home/alex/.bin/newyearmail-us.txt
0 8 1 1 * alex ssmtp me@gmail.com < /home/alex/.bin/newyearmail-nl.txt

2) How can I make it even better/add more bells and whistles and sillyness?

3) How would you accomplish the same using Arch? I don't use Mutt, but I understand I could send an attachment if I went that route.


< Daenyth> tomkx: my girlfriend is linux
< Daenyth> srsly
< Daenyth> she loves the way I «make install»
< Daenyth> all her /dev entries are mode 7 for me

Offline

#2 2009-12-29 21:20:40

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Automatic New Year mails?

For once off tasks, atd is more suitable than cron...

$ at 23.59 Dec 31
mail -s "New Year Message" friend@domain.com < /home/alex/.bin/newyearmail.txt
^D
$

Don't forget to make sure the atd daemon is started wink

Last edited by fukawi2 (2009-12-29 21:21:01)

Offline

#3 2009-12-30 03:09:21

Chokkan
Member
Registered: 2009-04-06
Posts: 129

Re: Automatic New Year mails?

Oh yes, I had just heard about atd. Thanks for that.


< Daenyth> tomkx: my girlfriend is linux
< Daenyth> srsly
< Daenyth> she loves the way I «make install»
< Daenyth> all her /dev entries are mode 7 for me

Offline

Board footer

Powered by FluxBB