Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
command line mail program [SOLVED - sendEmail]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Aysen
Apprentice
Apprentice


Joined: 18 May 2005
Posts: 187
Location: Poland

PostPosted: Thu Oct 27, 2005 4:22 pm    Post subject: command line mail program [SOLVED - sendEmail] Reply with quote

Hi.
Can anyone recommend a command line program to send email (to work in a bash script)? I don't want to setup my own server or anything, I just need a program able to send mail using my existing address (SMTP server). I know about mail, but... erm, call me stupid, but I can't use it... :oops: Or maybe configure something wrong... I have to setup sendmail correctly to be albo to use mail, right? If that is the program I need, could I ask for any guidance what to do to be able to send mail from one address to another?
Thank you very much!


Last edited by Aysen on Thu Oct 27, 2005 5:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
speak_see_hear
Apprentice
Apprentice


Joined: 12 Feb 2003
Posts: 168
Location: New Jersey

PostPosted: Thu Oct 27, 2005 4:53 pm    Post subject: Reply with quote

I *think* that mutt will do what you need.
_________________
"Beer is proof that God loves us, and wants us to be happy" -- Benjamin Franklin
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Thu Oct 27, 2005 5:01 pm    Post subject: Reply with quote

net-mail/sendEmail
net-mail/email
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
Aysen
Apprentice
Apprentice


Joined: 18 May 2005
Posts: 187
Location: Poland

PostPosted: Thu Oct 27, 2005 5:43 pm    Post subject: Reply with quote

Thanks for such a quick reply!
sendEmail is *the* program I needed!
I knew about mutt, but it has a ncurses/slang interface and I needed one with no interface but command line. Anyway, thank you both! :D
Back to top
View user's profile Send private message
fourhead
l33t
l33t


Joined: 03 Sep 2003
Posts: 875
Location: Cologne, Germany

PostPosted: Fri Oct 28, 2005 9:03 am    Post subject: Reply with quote

I'm just trying sendEmail too, but it doesn't work. When I run it with

./sendEmail -f myadress@mydomain.de -t myrealmail@otherdomain.de -u Test -m Test

I get this:

Code:

ERROR => Connection attempt to localhost:25 failed: IO:Socket:INET: connect: Connection refused


This is actually an Ubuntu install, so it might be Ubuntu-specific. It's a default config, I have no firewall at all, and I don't have sendmail or any other mail stuff installed. Any ideas?


Tom
Back to top
View user's profile Send private message
Aysen
Apprentice
Apprentice


Joined: 18 May 2005
Posts: 187
Location: Poland

PostPosted: Fri Oct 28, 2005 9:21 am    Post subject: Reply with quote

fourhead wrote:
I'm just trying sendEmail too, but it doesn't work. When I run it with

./sendEmail -f myadress@mydomain.de -t myrealmail@otherdomain.de -u Test -m Test

I get this:

Code:

ERROR => Connection attempt to localhost:25 failed: IO:Socket:INET: connect: Connection refused

You need to supply the -s option (server:port). For example, if you use smtp.mydomain.de as your SMTP server, use
Code:
sendEmail [your options] -s smtp.mydomain.de
(the port is optional and defaults to 25).

Moreover, if your mail server requires authentication, you'll need to emerge the masked (~x86) version of sendEmail - the current stable version doesn't support it (at least it didn't work for me). The -xu and -xp options are responsible for authentication. For more info launch sendEmail with no arguments.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Oct 28, 2005 9:35 am    Post subject: Reply with quote

With mutt, the command would be:
Code:
echo "This is the body." | mutt -s "This is the Subject" -a /tmp/attachment.zip recipient@company.com
Back to top
View user's profile Send private message
fourhead
l33t
l33t


Joined: 03 Sep 2003
Posts: 875
Location: Cologne, Germany

PostPosted: Fri Oct 28, 2005 4:19 pm    Post subject: Reply with quote

Shame on me :oops:

I didn't see the -s switch at all, but now it works, I'm using my own mail server with -xu and -xp. Thanks a lot!


Tom
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum