View previous topic :: View next topic |
Author |
Message |
ruach n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/71039425542a076bf67f08.jpg)
Joined: 28 May 2004 Posts: 67 Location: Utah
|
Posted: Thu Apr 21, 2005 5:53 pm Post subject: trouble sending mail from the command line [solved] |
|
|
Greetings,
I am trying to send mail from the command line like this:
Code: |
# echo 'test' |mail -s 'testing' user@someaddress
|
or
Code: |
# echo 'test' |ssmtp user@someaddress
|
Either way it doesn't work. The first command gives the error "sh: line 1: sendmail:/usr/sbin/sendmail: No such file or directory" the second command sends the email, but both the subject and body are blank. I have tried a number of other invocations but none have worked. I need to be able to do this as a oneliner so I can send email from scripts. Does any one know how to get this to work with ssmtp? I really don't want to have to instll qmail or postfix just to send emails.
Thanks
-Matthew _________________ For much wisdom is much grief and he that increaseth knowledge increaseth sorrow. Eccl 1:18
Last edited by ruach on Thu Apr 21, 2005 7:42 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mentok n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/207512593542121f00cde86.jpg)
Joined: 02 Nov 2003 Posts: 22 Location: Ontario, Canada
|
Posted: Thu Apr 21, 2005 6:22 pm Post subject: |
|
|
I have /usr/sbin/sendmail as a link to /usr/sbin/ssmtp and mail works fine.
Maybe try reemerging ssmtp and see if it creates a link, if not, create it manually. _________________
Code: | 'emerge' is not recognized as an internal or external command,
operable program or batch file. |
Click here for hardcore nudity!!! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ruach n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/71039425542a076bf67f08.jpg)
Joined: 28 May 2004 Posts: 67 Location: Utah
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dashnu l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 21 Jul 2004 Posts: 703 Location: Casco Maine
|
Posted: Thu Apr 21, 2005 6:45 pm Post subject: |
|
|
emerge mailx
echo 'test' | mail -s "Subject" me@someplace.com _________________ write quit bang |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ruach n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/71039425542a076bf67f08.jpg)
Joined: 28 May 2004 Posts: 67 Location: Utah
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|