Not able to send the mail using mail and mailx command

Hi All,

I am trying to send a mail from linux server but could'nt able to send the mail.

I tried the below syntax's so far but no luck.

mail -s �Hello world�  abc@xyz.com <  /usr/g/txt.log
 
cat "txt.log" | mailx -s "Hello world" abc@xyz.com
 
mailx -s �Hello world� abc@xyz.com < /usr/g/txt.log < /g/txt.log

I have veririfed sendmail using man. It exists.But dont know where went wrong.

Could you please let me know how to check the mail server is functioning or not on linux server.

Try this command

mail -s " Test" abc@xyz.com <press enter> 
<type some message> <Press Enter>
. <press enter to sent>
cc: <press enter>

Check this one is working

Run a sendmail test:
sendmail -bv abc@xyz.com
Look at DSsmarthost in /etc/{mail/}sendmail.cf
The "smarthost" or "smtp gateway" is part of the SMTP infrastructure where you plug in; it can be a host or (better) an MX record.
An MX record can be looked up with
nslookup -q=mx xyz.com or
dig -t mx xyz.com