LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2012, 12:54 AM   #1
sukhdip
Member
 
Registered: Sep 2011
Posts: 54

Rep: Reputation: Disabled
mailing script


Hi..
I need to create a script which will send a mail with attached file of log whenever its invoked with some text in its body. (Using Sendmail)
I don't have any idea regarding that.

any one help me out with this.

Thanks,
 
Old 02-02-2012, 01:02 AM   #2
jjjj12212
LQ Newbie
 
Registered: Feb 2012
Posts: 16

Rep: Reputation: Disabled
I like to use the Mutt as my mail client to send attachment logs to myself.

Code:
 echo " This is a test " | mutt -a /path/to/filename.log -- test@test.com
make sure you have mutt installed.
 
Old 02-02-2012, 01:10 AM   #3
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Check this page for mailing logs through script:

http://www.simplehelp.net/2008/12/01...-command-line/
 
Old 02-02-2012, 11:28 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,504

Rep: Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992
Quote:
Originally Posted by sukhdip View Post
Hi..
I need to create a script which will send a mail with attached file of log whenever its invoked with some text in its body. (Using Sendmail)
I don't have any idea regarding that.

any one help me out with this.

Thanks,
Really?? You were given plenty of ideas the last time you asked this same question
http://www.linuxquestions.org/questi...urgent-903329/

You've also been given quite a few tips/pointers about writing shell scripts in your other threads, so what are you confused about?? Why don't you post what you've written, and tell us where you're stuck?
 
  


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
Shell Script or perl help. to write sections of a log to a tmp file for mailing pobman Programming 2 02-02-2009 03:30 PM
Need Help With Mailing! linuxnoob7 Linux - Software 14 08-15-2005 10:14 AM
Bash script - mailing list haze Programming 3 05-05-2005 12:03 AM
mailing praveenv Linux - Newbie 2 09-10-2004 05:19 AM
e-mailing Linux~Powered Linux - Software 3 02-12-2004 08:07 PM


All times are GMT -5. The time now is 07:49 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