Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

how to get cron to email a file as an attachment every day?

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  meetings...  
Author Message
abc

External


Since: Sep 23, 2004
Posts: 4



(Msg. 1) Posted: Thu Sep 23, 2004 6:54 pm
Post subject: how to get cron to email a file as an attachment every day?
Archived from groups: alt>www>webmaster (more info?)

anybody know the easiest way to send a file from a linux server ever day?
it would need to be an attachment to an email.
i am assuming the command 'mail' is used, but cant work out how to do it
beyond that - the attachment is sent as text in the body of the email
cheers

 >> Stay informed about: how to get cron to email a file as an attachment every day? 
Back to top
Login to vote
gsexton1

External


Since: Aug 02, 2004
Posts: 13



(Msg. 2) Posted: Thu Sep 23, 2004 6:54 pm
Post subject: Re: how to get cron to email a file as an attachment every day? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 23 Sep 2004 15:54:40 +0100, abc wrote:

 > anybody know the easiest way to send a file from a linux server ever day?
 > it would need to be an attachment to an email.
 > i am assuming the command 'mail' is used, but cant work out how to do it
 > beyond that - the attachment is sent as text in the body of the email
 > cheers

Use the -a switch:

mail -s "my Subject" -a MyAttachment myaddress RemoveThis @mydomain.com

when in doubt "man mail" to view the man page.

--
George Sexton
MH Software, Inc. - Home of Connect Daily Web Calendar
<a style='text-decoration: underline;' href="http://www.mhsoftware.com" target="_blank">http://www.mhsoftware.com</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: how to get cron to email a file as an attachment every day? 
Back to top
Login to vote
abc

External


Since: Sep 23, 2004
Posts: 4



(Msg. 3) Posted: Thu Sep 23, 2004 8:33 pm
Post subject: Re: how to get cron to email a file as an attachment every day? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"George Sexton" <gsexton RemoveThis @mhsoftware.com> wrote in message
news:pan.2004.09.23.15.17.28.680386@mhsoftware.com...
 > On Thu, 23 Sep 2004 15:54:40 +0100, abc wrote:
 >
  >> anybody know the easiest way to send a file from a linux server ever day?
  >> it would need to be an attachment to an email.
  >> i am assuming the command 'mail' is used, but cant work out how to do it
  >> beyond that - the attachment is sent as text in the body of the email
  >> cheers
 >
 > Use the -a switch:
 >
 > mail -s "my Subject" -a MyAttachment myaddress RemoveThis @mydomain.com
 >
 > when in doubt "man mail" to view the man page.

hmmm thanks for that but i dont appear to have a -a funtion on my mail
command.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: how to get cron to email a file as an attachment every day? 
Back to top
Login to vote
gsexton1

External


Since: Aug 02, 2004
Posts: 13



(Msg. 4) Posted: Thu Sep 23, 2004 8:33 pm
Post subject: Re: how to get cron to email a file as an attachment every day? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 23 Sep 2004 17:33:24 +0100, abc wrote:

 >
 >
 > hmmm thanks for that but i dont appear to have a -a funtion on my mail
 > command.

Do you have nail?

--
George Sexton
MH Software, Inc. - Home of Connect Daily Web Calendar
<a style='text-decoration: underline;' href="http://www.mhsoftware.com/conectdaily.htm" target="_blank">http://www.mhsoftware.com/conectdaily.htm</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: how to get cron to email a file as an attachment every day? 
Back to top
Login to vote
kiwienzed

External


Since: Sep 03, 2004
Posts: 184



(Msg. 5) Posted: Fri Sep 24, 2004 8:37 am
Post subject: Re: how to get cron to email a file as an attachment every day? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"abc" <abc RemoveThis @def.com> wrote in message news:2rgc6lF19r9o4U1@uni-berlin.de...
 >
 > "George Sexton" <gsexton RemoveThis @mhsoftware.com> wrote in message
 > news:pan.2004.09.23.15.17.28.680386@mhsoftware.com...
  > > On Thu, 23 Sep 2004 15:54:40 +0100, abc wrote:
  > >
   > >> anybody know the easiest way to send a file from a linux server ever
day?
   > >> it would need to be an attachment to an email.
   > >> i am assuming the command 'mail' is used, but cant work out how to do
it
   > >> beyond that - the attachment is sent as text in the body of the email
   > >> cheers
  > >
  > > Use the -a switch:
  > >
  > > mail -s "my Subject" -a MyAttachment myaddress RemoveThis @mydomain.com
  > >
  > > when in doubt "man mail" to view the man page.
 >
 > hmmm thanks for that but i dont appear to have a -a funtion on my mail
 > command.
Try nail, info at
<a style='text-decoration: underline;' href="http://freshmeat.net/projects/nail/?branch_id=6943&release_id=173690" target="_blank">http://freshmeat.net/projects/nail/?branch_id=6943&release_id=173690</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: how to get cron to email a file as an attachment every day? 
Back to top
Login to vote
gfy

External


Since: Mar 08, 2004
Posts: 33



(Msg. 6) Posted: Sun Sep 26, 2004 12:48 pm
Post subject: Re: how to get cron to email a file as an attachment every day? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

George Sexton wrote:

 > On Thu, 23 Sep 2004 17:33:24 +0100, abc wrote:
 >
 >
  >>
  >>hmmm thanks for that but i dont appear to have a -a funtion on my mail
  >>command.
 >
 >
 > Do you have nail?
 >

How about using a here-document?
The following works for me.

Change the addressee, from headers and all that.


#! /bin/bash
#
# IRSforms -- reminder run from cron to mail IRS 1040ES forms
#
#
#
/usr/sbin/sendmail nobody.TakeThisOut@example.com <<End-of-Message
To: nobody.TakeThisOut@example.com
From: reminder-service.TakeThisOut@example.com
Subject: [Reminder] IRS 1040ES due quarterly

This is your reminder that IRS forms and a check is
due quarterly.

15-Apr, 15-Jun, 15-Sep, 15-Jan.
To keep the books looking better, pay the 15-Jan
payment in December (keep it in the same year!).


Regards,
The reminder service
End-of-Message



--
The email address in the From: line of this message is a
spamtrap. Mail sent to this address may get the sender's
mailserver listed in one or more DNSBLs. -- Rex Karz<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: how to get cron to email a file as an attachment every day? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
help needed with sending a file as attachment - Hi, I need to have a form that lets us to pick a document already on the server and send it to an Email address. Any one got a good idea of where should i start? my form now can only read a text file and send it in the message body. But i need to be abl...

Controlpanel/CPanel email filter file location? - My host uses John N Koston's Cpanel software. I have set up some spam filters and misguidedly put a filter on all emails containing <title> in an attempt to reduce HTML spam. Unfortunately, the <title> html tag half-way through the spam-fi...

red hat/cpanel/cron help needed... Please? - Ok I have a few sites that all need cron to run to work/update... There was so many running at tone time it would crash the server... A friend told me to try this.. login as root and in cron put */20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>...

Cron Jobs -> Config Question - I hope someone in this group can help. I am familiar with running cron jobs, but have run into a particular syntax that I cannot get around. I need to run a file on my server a couple of times a day. The file is a PHP file, but it requires several..

Email/ISP in the USA - Hi, Im sorry that isnt really a webmaster query as such, however I run a couple of sites in the UK for various organisations (amatuer not professional before you guys slate my sites!!). I recieve a large amount of spam, sorry emails, daily, some of which...
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]