Results 1 to 5 of 5
Hello everybody!
I am trying to send an email from a script (say, bash). I don't want to (and can't) setup a server for sending the message. Is there something ...
- 05-18-2007 #1Just Joined!
- Join Date
- Jun 2006
- Posts
- 5
Send an email from a shell script
Hello everybody!
I am trying to send an email from a script (say, bash). I don't want to (and can't) setup a server for sending the message. Is there something like Thunderbird/Evolution/etc. that I can use from the command line. That is, I give the address of the SMTP, port, user, pass, etc. and it sends the email. I googled it and also searched the forums, but only found info on how to setup and use postfix/sendmail. Is this the only possibility?
Thanks in advance!
Not sure if this is the right section, if not, please move it.
- 05-19-2007 #2Linux Enthusiast
- Join Date
- Jul 2005
- Location
- Maryland
- Posts
- 521
This should do it:
But it will come from your IP.Code:echo "Here goes email body" | mail -s "Here Goes The Subject" receiver@receiveraddress.whatever
- 05-19-2007 #3Just Joined!
- Join Date
- Jun 2006
- Posts
- 5
Thanks for the reply, pavlo!
I had already tried that. `mail' uses sendmail/postfix to deliver the message, doesn't it? I get the following "warning" and no message gets delivered.
Code:[~] $ echo foo | mail -s subject goo@bar.com postdrop: warning: unable to look up public/pickup: No such file or directory
- 05-27-2007 #4Linux Enthusiast
- Join Date
- Jul 2005
- Location
- Maryland
- Posts
- 521
If you haven't figured it out yet, take a look at these posts:
Postfix 0308: Re: unable to look up public/pickup: No such file or directory
Postfix 0308: Re: unable to look up public/pickup: No such file or directory
- 05-27-2007 #5Just Joined!
- Join Date
- Jun 2006
- Posts
- 5
Starting the daemon fixed the problem.
Thanks!


Reply With Quote

