# sending mail from tcsh



## kp8 (Oct 25, 2002)

I am wondering, do i need to fuss with all that sendmail crud in order to be able to send mail from the shell? I don't much care about getting mail in the shell, i just want to be able to do something like:

% cat foo bar spam | mail mysorrybutt@dotmacsucks.com

or whathave you. I send mail now and it just goes to another dimention.

-k


----------



## scruffy (Oct 25, 2002)

The "mail" command tries to connect to a SMTP server (like sendmail) running on the local machine.  So yes, if you want to 

% cat foo bar spam | mail mysorrybutt@dotmacsucks.com 

then you will need some mail server running on your machine.


----------



## michaelsanford (Oct 25, 2002)

scruffy, where is the config file for mail (I want to specify an external mail server).

TIA


----------



## michaelsanford (Oct 25, 2002)

Or better yet, the config for smtpd, or is that part of Apache?


----------



## scruffy (Oct 25, 2002)

As far as I know, mail cannot be made to look to an outside server.  The manpage didn't make it look that way, anyway.

smtpd is sendmail.  Setting it up as a persistent server is somewhat complex.  If you just want to send mail out, you might try changing your script to:

% cat foo bar spam | sendmail mysorrybutt@dotmacsucks.com


----------

