mailx with attachment

Hi,
When i used below command, i am able to send mail

mailx -s "Testing mail working or not " babu.sudhakar@ymail.com"

but if i want send attachment with mail,which syntax i need to follow to send a file as attachment.

try

uuencode "attachment file name"|mailx -s "Test mail" xyz@mail.com

It works for .csv files for me..Try and let me know as well :smiley:

This comes up all the time. Searching the site finds all kinds of examples.

Google Search Results for mailx attachment | The UNIX and Linux Forums

I had the same need time ago. I tried with mailx but it didn't work with a lot of files I wanted to send in an automated way. I finally installed mutt:

Look for in in sunfreeware
Si very very powerful