View previous topic :: View next topic |
Author |
Message |
Aysen Apprentice
Joined: 18 May 2005 Posts: 187 Location: Poland
|
Posted: Thu Oct 27, 2005 4:22 pm Post subject: command line mail program [SOLVED - sendEmail] |
|
|
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... 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 |
|
|
speak_see_hear Apprentice
Joined: 12 Feb 2003 Posts: 168 Location: New Jersey
|
Posted: Thu Oct 27, 2005 4:53 pm Post subject: |
|
|
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 |
|
|
think4urs11 Bodhisattva
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Thu Oct 27, 2005 5:01 pm Post subject: |
|
|
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 |
|
|
Aysen Apprentice
Joined: 18 May 2005 Posts: 187 Location: Poland
|
Posted: Thu Oct 27, 2005 5:43 pm Post subject: |
|
|
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! |
|
Back to top |
|
|
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Fri Oct 28, 2005 9:03 am Post subject: |
|
|
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 |
|
|
Aysen Apprentice
Joined: 18 May 2005 Posts: 187 Location: Poland
|
Posted: Fri Oct 28, 2005 9:21 am Post subject: |
|
|
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 |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Fri Oct 28, 2005 9:35 am Post subject: |
|
|
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 |
|
|
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Fri Oct 28, 2005 4:19 pm Post subject: |
|
|
Shame on me
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 |
|
|
|