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 22nd October 2010, 00:02
misterm misterm is offline
Senior Member
 
Join Date: Aug 2005
Posts: 584
Thanks: 25
Thanked 8 Times in 7 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
__________________
ISPConfig, the panel fantastic , http://www.ispconfig.be/forums/
http://www.ispconfig.be/
Reply With Quote
Sponsored Links
  #2  
Old 22nd October 2010, 16:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 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 23:33
Webmin upgrade lishaw1968 Installation/Configuration 15 26th August 2010 16:23
rewrite url not work apache2+mod_rewrite mohamedtah Installation/Configuration 1 31st January 2009 14:00
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 14:06
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 18:17


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


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