how to send mail in unix

Dear friends,

I want to send mail automatically like (crontab).

I have tried with mail command but it it not working.

mail -s "hello" xyz@yahoo.com.

please help.

try this

mailx -s "hello" xyz@yahoo.com

its working fine in Sun OS 5.8

Regards
Raju

I tried your code.

my system os was linux.

my /usr/bin dir mailx command was not there. only mail command was there.

so now how to send mail

please help

regards
rajan

try this

mailx -s "hello" xyz@yahoo.com

its working fine in Sun OS 5.8

i don know its working or not
but i do like this: mailx -s "tuxedo is working fine" xxx@xxx.com

prompt does not return;
how much time should it take to send a mail?

i stopped it since it was taking a lot of time...

my O.S is Sun OS 5.8 too

any comments
Regards
Abhijeet

Dear abhijit,

I have tried your code.

mailx -s "hello" xyz@yahoo.com

but the error mailx command was not found was coming.

my os was linux.

how to solve this problem.

regards
rajan

since you had not specified the input to the mailx the command is waiting on your standard input
and waiting on a read for ever.

use,

mailx -s <subject> <address> < <file>

i believe the same had been discussed many times.

I have tried your code,

but the mailx command was not found was coming.

what should i do.

regards
rajan

this could be a problem where path of mailx is not available in
env variable PATH
either,
give the full path while executing the command
or
append the path where mailx is available to your env variable PATH

In Linux

mail -s "hello" xyz@yahoo.com

Dear cshsa,

I have tried your code

after typing code i give ctrl-d.

after that i have checked in mail queue by giving command mailq.

there i find that connection timed out while connecting to xyz@yahoo.com

was there.

what should i do

But the same is working perfectly for me in Linux ...
Are you sure that your connection settings and SMTP settings are perfect ?

Iam using mozilla firefox browser.

how to check my SMTP settings.

waiting for reply.

Hi Rajan

Is your prob resoled? I am also having same issues in some other server.

mail / mailx commands seems to be working fine (I m using Linux boxes) but I am not receiving the mail. Can anyone suggest what can be the reason?

Thanks
Chirantan