Re: Send email to mail server on localhost from bash script

2013-02-20 Thread Zach Cox
Thanks Barry & Eike! Turns out msmtp actually was working for me, but I was making a stupid mistake in a Mailet. You did inspire me to roll my own little app using JavaMail which will make it easy to create some complex emails in the future. Thanks, Zach On Wed, Feb 20, 2013 at 4:48 PM, Eike K

Re: Send email to mail server on localhost from bash script

2013-02-20 Thread Eike Kettner
Hi Zach, I'm using mutt as mail client and I use it for the purpose you describe, too. All you need is a ~/.muttrc file with the required stuff. Then this command mutt -s "my subject" user@localhost < sometext.txt should work. You can also set a config file explicitely with "mutt -F my-other-m

Re: Send email to mail server on localhost from bash script

2013-02-20 Thread Barry Lai
Here's perl I use: use Net::SMTP; my $to = "someu...@mydomain.com"; my $from = "someb...@somedomain.com"; my $subject = "test message subject"; my $message = "some message body"; #Create a new object with 'new'. $smtp = Net::SMTP->new("localhost"); $smtp->mail($from); $smtp->to($to