Sending text file in mail

hi
i need example code for sending .txt file in mail
thankyou

seems same question on this one???