LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how do I send email through mail noninteractively? (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-send-email-through-mail-noninteractively-510500/)

laggerific 12-14-2006 04:39 PM

how do I send email through mail noninteractively?
 
I thought it was done like this:
echo "This is the body of the email" > mail -s this is the subject someaddress@somedomain.com

But for some reason I'm not getting much luck with receiving messages sent like that...although if I do it interactively I'm getting them fine. Is there a better way to do this?

gilead 12-14-2006 04:57 PM

Have you tried it this way instead?
Code:

echo "This is the body of the email" | mail -s "this is the subject" someaddress@somedomain.com

laggerific 12-15-2006 09:28 AM

I have now...that's what I was looking for.

Thank you thank you.


All times are GMT -5. The time now is 07:07 PM.