LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-27-2002, 11:11 AM   #1
RKris
Member
 
Registered: May 2002
Location: UK
Distribution: Mandriva linux
Posts: 152

Rep: Reputation: 15
Sending mail through crontab!!


Hi,
I have to send a mail at a particular time say 7:00a.m. i the morning. The mail also has an attachment.
How will I set this up?

regards
Krishna
 
Old 08-27-2002, 11:14 AM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
What is an attachment's format (a text file, compressed archive, other)
 
Old 08-27-2002, 11:16 AM   #3
RKris
Member
 
Registered: May 2002
Location: UK
Distribution: Mandriva linux
Posts: 152

Original Poster
Rep: Reputation: 15
A document

regards
Kris
 
Old 08-27-2002, 04:57 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
00 07 * * * ($LOGNAME) cat <file> | gzip | uuencode <file.gz> | mail -s "This subject" user@host
If it aint large, leave out the gzip part. This will mail an inline uuencoded file, any decent MUA knows what to do with it, if you add the uue or b64 extension even Aladdin Expander or Winzip can handle it (if there's a non Linux user on the other end).
Btw you could do this line, or make crontab execute it from a file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix mail transfer agent not sending mail locally or to other servers sketelsen Linux - Software 3 02-09-2006 12:16 PM
Cron mail sending using outside SMTP mail server Utah Linux - Software 6 08-24-2005 08:44 PM
crontab sending mail ryedunn Linux - Newbie 3 01-21-2005 07:47 PM
sending mail between two mail server !! hitesh_linux Linux - General 3 12-14-2003 01:53 PM
Sending an automatic mail using bash + mail Minuteman Linux - Software 4 08-21-2003 01:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration