Author Topic: Bash script emailing capabilities  (Read 1604 times)

Offline dj_bridges

  • Hero Member
  • *****
  • Posts: 638
Bash script emailing capabilities
« on: March 02, 2011, 12:07:55 AM »
I need to write a bash script that will ultimately put a load on info into an email and send it off through a gmail account. I have spend some time trying to get sendmail / postfix  etc etc working, but they seem so complicated and I have failed miserably so far. Does anyone know either:

1) How to easily setup a CLI MTA?
2) Another option?

Thanks in advance...
PCLinuxOS 2012 running KDE4 on Lenovo ThinkPad T420, Quad core Intel i5 @ 2.6GHz, 6Gb Ram, 400 Gb HDD

ongoto

  • Guest
Re: Bash script emailing capabilities
« Reply #1 on: March 02, 2011, 02:32:23 AM »
Just do mail -h on the command line to see the switches and options to use in your command.  For more, see if you can find a man page on Mailx or nail with google.  It's the simplest way.  
« Last Edit: March 02, 2011, 02:49:52 AM by ongoto »

Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Re: Bash script emailing capabilities
« Reply #2 on: March 02, 2011, 02:54:57 AM »
I need to write a bash script that will ultimately put a load on info into an email and send it off through a gmail account. I have spend some time trying to get sendmail / postfix  etc etc working, but they seem so complicated and I have failed miserably so far. Does anyone know either:

1) How to easily setup a CLI MTA?
2) Another option?

Thanks in advance...

I am posting this from my phone atm so I do not have access to the website detail.

There is an app called dmc "dynamic mail client" that you would need to place a request for, if you are unable to Google the detail post back later and I will post it here for you


Jase
« Last Edit: March 03, 2011, 04:22:15 AM by old-polack »


I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15279
  • ┌∩┐(◕_◕)┌∩┐
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline dj_bridges

  • Hero Member
  • *****
  • Posts: 638
Re: Bash script emailing capabilities
« Reply #4 on: March 02, 2011, 05:07:53 AM »
Thanks for all the responses.

ongoto - followed up on mailx and found this website http://www.unix.com/shell-programming-scripting/18370-sending-email-text-attachment-using-mailx.html, but we haven't got uuencode in the repos, so couldn't test. Tried modifiying the suggestion from the webpage to remove uuencode, but no mail as yet....

hootiegibbon - couldn't find the program you mentioned in a google search - would appreciate any links. Am happy to put in a request if this is what I am looking for.

menotu - will check the link, but for the last 5 mins it has failed to load!
PCLinuxOS 2012 running KDE4 on Lenovo ThinkPad T420, Quad core Intel i5 @ 2.6GHz, 6Gb Ram, 400 Gb HDD

Offline pags

  • Hero Member
  • *****
  • Posts: 2515
  • Keep it clean.

Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Re: Bash script emailing capabilities
« Reply #6 on: March 02, 2011, 01:49:33 PM »
dj_bridges,

Here are some links to the dmc script


mentioned here as a link to 
 http://lolcathost.org/cgi-bin/hg/dmc/summary


On a quick look it appears ot be something like what you require.

Jase


I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

Offline dj_bridges

  • Hero Member
  • *****
  • Posts: 638
Re: Bash script emailing capabilities
« Reply #7 on: March 03, 2011, 04:05:25 AM »
hootiegibbon - thanks for the link. I can't really make out what the application does though. Haven't had much chance to look at it in depth, but will try and do so....
PCLinuxOS 2012 running KDE4 on Lenovo ThinkPad T420, Quad core Intel i5 @ 2.6GHz, 6Gb Ram, 400 Gb HDD