[Freeswitch-users] vm to email

John freeswitch at earthspike.net
Fri Feb 17 18:41:03 MSK 2012


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 at agschtd05-srv09 usr]# cat email.txt |
> /usr/local/freeswitch/scripts/sendemail.py -i -d -f freeswitch at xxx.com
> aakash.viswam at xxxx.com
> -bash: /usr/local/freeswitch/scripts/sendemail.py: /usr/bin/python^M: bad
> interpreter: No such file or directory



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list