LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   sending email (https://www.linuxquestions.org/questions/linux-software-2/sending-email-257300/)

cambie 11-20-2004 01:46 PM

sending email
 
What all do I have to nave enabled and or installed to be able to send mail to an internet address from the command line? I've been trying: mail -s test somenumber@mobile.mycingular.com msg text, but it doesn't get received. Sendmail's running, but I"m not familiar enough with the mail server stuff to know what needs to be running for this to work. Help me learn!

PS- i'm just doing this to send me a text message on my cell phone for certain events.

J_Szucs 11-20-2004 06:02 PM

Suppose that you have some text in message.txt. A possible way to send that text in a mail to someaddress@foo.bar is this:

cat message.txt | formail -A "To: someaddress@foo.bar" | sendmail -oi -t

This requires that you have procmail installed; and sendmail should be correctly configured to be able to send mails.
If you do not operate your own mail server (which would require an own domain name), then you should configure sendmail to send mails via your ISP's smtp server (enter its name in line "smartrelayhost" line in sendmail.conf).


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