Attach a document in mail using sendmail command

Hi Guys,

May i know how to attach a document using sendmail command in Linux platform.... :confused:

If you use the sendmail command to send an email, you have to build every line of the email yourself. Send yourself an email with an attachment from your regular mail client, then analyse the contents of your mailbox on the server (prior to retrieving it with either pop or imap.)
You will probably need the base 64 encoding and decoding programs. These are available in a variety of languages. Base64 - Wikipedia

Use uuencode like in this example

How To Send an Email With Attachment and Body from Linux