mail: subject and body text

HI,

After giving the mail -e name@domain.com its asking the subject : after this its enter in to the body of the mail i.e. (in edit mode)
How to end this edit process to send mail ?

replace mail by

mailx

End the mail message with ctrl/d (end of file). (Same with "mailx").

Some versions of "mail" will end the message if you type a full stop on a line on its own