[Freeswitch-users] freeswitch.email () failing

Drew Terenzini drew_terenzini at wesleycloversolutions.com
Fri Dec 16 03:57:48 MSK 2011


 

            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 at destination.com>","<source at 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 at vtap> 2011-12-15 16:36:19.246622 [ERR] mod_lua.cpp:182
/opt/freeswitch/scripts/email.lua:1: attempt to call field 'email' (a nil
value)

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!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111215/b641e89e/attachment-0001.html 


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