Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 21st October 2010, 23:02
misterm misterm is offline
Senior Member
 
Join Date: Aug 2005
Posts: 519
Thanks: 15
Thanked 7 Times in 6 Posts
Question create a bash file to send emails

Hello everyone, I'm back, I have a question, how we create a bash file to send emails when I say this not to be spam, but just to justify that this goes perfectly.

Script source bash :

Quote:
#!/bin/sh
/usr/bin/mail -s "[RKHUNTER] Rapport de scan journalier" support@localhost
Quote:
sh send.sh
Cc:
Thank you for your help

MM
Reply With Quote
Sponsored Links
  #2  
Old 22nd October 2010, 15:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
 
Default

You can try something like this:

Code:
cat /path/to/message.txt | formail -c -I"Subject: bla" -I"From: someone@somedomain.com" -I"To: you@yourdomain.com" -I"Received: from www.somedomain.com ([1.2.3.4])" | sendmail you@yourdomain.com
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't finish install due a problem Sam9999 Installation/Configuration 7 17th September 2010 22:33
Webmin upgrade lishaw1968 Installation/Configuration 15 26th August 2010 15:23
rewrite url not work apache2+mod_rewrite mohamedtah Installation/Configuration 1 31st January 2009 13:00
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 13:06
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 17:17


All times are GMT +2. The time now is 09:09.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.