Hi guys,

I can now send SMS to phones with kannel. Now I am trying to integrate Kannel 
with Postfix in a way that whenever a new message arrives at the inbox it would 
be forwarded to the intended receivers to their mobile phones....

I have read some posts about this, and have tried using procmail and a perl 
script to parse the email and forward it to my /cgi-bin/sendsms,,

here is my .procmailrc

TO=`formail -xTo:`
SUBJECT=`formail -xSubject: \
| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
SENDER=`formail -xFrom: \
| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
BODY= `formail -I "" \
| expand | sed -e '1,/^$/ d' -e '1,/^$/ d'`
BODY=`formail -I "" `
SENDER=`formail -rtzxTo:`
:0
| perl /home/sms/massms/newsms.pl $SENDER $TO $SUBJECT $BODY >> 
/home/sms/massms/maillog.txt


Unfortunately, whenever I test sending an email, the mail is just received by 
the procmail and nothing happens anymore,, The log I specified in .procmailrc 
just remains to be empty,

Could there be any other way to implement Mail to SMS? Or couold any body point 
ut what possibly is my problem?
I hope somebody could help me,

Thanks in advance
Joyce


      

Reply via email to