Akash, It looks like you have included an extra carriage return at the end of the line (the ^M). Did you edit the file in a Windows editor like Notepad, perhaps, before transferring it across? Do this: cd /usr/local/freeswitch/scripts mv sendemail.py sendemail.py.old sed 's/\x0D$//'<sendemail.py.old>sendemail.py chmod +x sendemail.py more sendemail.py should show that there are no ^M at the end of each line. Then try again. John On 17/02/12 15:24, Aakash wrote:
Hi John,
It throws me an error as below.
[root@agschtd05-srv09 usr]# cat email.txt | /usr/local/freeswitch/scripts/sendemail.py -i -d -f freeswitch@xxx.com aakash.viswam@xxxx.com -bash: /usr/local/freeswitch/scripts/sendemail.py: /usr/bin/python^M: bad interpreter: No such file or directory