How do I convert Mail data into a File with SMTP format? HELP

Hey guys could you help me out. I need to convert data in the mail document (to:from:subject:body, etc.) into a file with an SMTP format (e.g.) x.eml or y.msg. If you know a way to do this could you please email me at my email ad (francis@imaginet.com.ph) or answer my post. I really appreciate your help. Thanks.