Good
evening, I’m attempting to use the freeswitch.email from http://wiki.freeswitch.org/wiki/Lua#freeswitch.email.
I am running FS 1.04 on Ubuntu 10.04 LTS, and for various reasons having
to do with programs running on top of FS, I cannot just upgrade FS without
breaking other things.
I have installed postfix
successfully and tested sendmail from the Linux CLI without a problem.
Emails are delivered to the appropriate external addresses. My
switch.conf.xml has:
->
<param
name="mailer-app" value="sendmail"/>
<param
name="mailer-app-args" value="-t"/>
…
and I have a stripped down test script called “email.lua” in my
scripts directory as follows:
freeswitch.email("<destination@destination.com>","<source@freeswitch.source.com>","subject:
Test message from VTAPENG\n","Hello you have a test message.”)
The
destination and source email addresses are valid and receiving email when sent
from other programs/sites.
In
the FS_CLI, I attempt to test-run the script by entering “lua email.lua”,
only to get the following error each time:
-ERR encounterd
freeswitch@vtap>
stack traceback:
/opt/freeswitch/scripts/email.lua:1: in main chunk
This error
appears to terminate the script, and no response is received from postfix, and
no error is logged to mail.log. I’ve tried a number of ways to
modify the outcome, without real result. Searching on the Wiki and the
mailing lists hasn’t resulted in anything that has worked either.
Is
freeswitch.email() not supported in FS 1.04? Is there some context that I’m
missing for this to work? Any help would be appreciated, thanks!