Unable to set end of line in mail command

Hi ,
Am trying to send mail using the mail command, but the mail command is working but its not sending automatically after pressing .(dot) in the command prompt it sends . How to achieve that. Also it showing the below line after pressing the dot .

/home/abc1/dead.letter... Saved message in /home/abc1/dead.letter
if <condition>
mail -s "test mail " abc@xyz.com -c bb@xyz.com
fi

this is the command am trying it sending mail to both to and cc field but I have to enter .(dot) in the command prompt.Need to achieve without doing that.

try this..

if <condition>
mail -s "test mail " "abc@xyz.com" -c "bb@xyz.com" < file
fi
 

Hi,
The code which you gave is not working. If I give

mail -s "test mail " "abc@xyz.com" -c "bb@xyz.com"

i have to press . as usual and if i give

mail -s "test mail " "abc@xyz.com" -c "bb@xyz.com" < file

its not working and it doesnt shows any error

It is working fine that's why it won't show any error...
try to give some real email address and check...

I tried with real address only and its not sending the mail option. Am getting the file not found error can you pls let me know what is the usage of using "<file" at the end.
Error:

file: No such file or directory

Create one empty file in the code or add content that you want to send through the mail in that file..