LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-16-2008, 09:29 AM   #1
kopite
Member
 
Registered: Nov 2003
Distribution: Debian Etch
Posts: 33

Rep: Reputation: 15
Using a script to send a file to email address


Hi,

I am having problems atm. Basically I have a script that pulls system logs from a router and puts them into a file. I want to then send an email with this file to an eamil address.

My server has EXIM4 running for email. I can send an email out fine but i`m not sure how to send a file as an attachment.

Any help wouyld be most welcome.
 
Old 06-16-2008, 09:56 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
You can use mutt with option -a to send an attachment, as in
Code:
mutt -s $SUBJECT -a $FILE $E_MAIL < /dev/null
or uuenview, as in
Code:
uuenview -m $E_MAIL -s $SUBJECT -a $FILE < /dev/null
 
Old 06-17-2008, 03:11 AM   #3
kopite
Member
 
Registered: Nov 2003
Distribution: Debian Etch
Posts: 33

Original Poster
Rep: Reputation: 15
Will using mutt or uuenview cause any problems for EXIM?
 
Old 06-17-2008, 03:21 AM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
Originally Posted by kopite View Post
Will using mutt or uuenview cause any problems for EXIM?
It shouldn't. If so, it is a bug.
 
  


Reply



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
how to send the output of cronjobs to another email address ? kirtikjr Linux - Software 1 07-12-2007 05:36 PM
Script to check IP address and send to an email kbrajesh Linux - Networking 4 02-08-2007 03:13 AM
Send email when TCP/IP address changes scherfistv Linux - Networking 3 07-11-2006 05:02 PM
Send logs to email address bond00 Linux - Networking 1 03-28-2006 06:01 PM
how to send logs (etc.) to email address??? win32sux Slackware 7 08-26-2004 12:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:06 PM.

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
Open Source Consulting | Domain Registration