First type the command
cat > file.c
choose a transfered file. Finally, type
Ctrl + D :end of file
mail your_email_address < file.c