LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   can i send mail from command line? (http://www.linuxquestions.org/questions/linux-software-2/can-i-send-mail-from-command-line-378935/)

iflorea 11-01-2005 09:06 AM

can i send mail from command line?
 
hello
i want to send a mail message from a script
can anybody tell me how can i do this?
thanks

bathory 11-01-2005 09:16 AM

Code:

man mail or man mailx

iflorea 11-01-2005 09:32 AM

maybe i did'n understand well but i want to send mail in non interactive mode
i already send a mail with mail but i had to write it interectively and to press ctrl+D to end it...

bathory 11-02-2005 03:23 AM

If you have saved your message in a file you can:
Code:

mail -s "subject" user@domain.com < message

iflorea 11-02-2005 03:29 AM

tanks to all
Meanwhile i found another one solution:
sendmail user@domain.com < mail_file
bye

LinuxLala 11-02-2005 04:14 AM

This is a bit of a shameless plug but you can read this article on sending mails from the command line:

http://www.linux.com/article.pl?sid=05/10/07/172259

unixbhaskar 11-02-2005 07:08 AM

i hope u have got ur ans


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