I'm trying to send an email from an outbound dialplan and I have the Advanced->Default Settings->Email setup and verified working.
I'm using the example here (see the screen shot): https://www.pbxforums.com/threads/change-outbound-caller-number.2731/post-7769
In an outbound dialplan I have the tag set to action, the type set to lua and the data set to email.lua to@email.com from@email.com ' ' 'Test Email' 'Test Body'
The position of the dialplan entry is right before the bridge to the gateways.
My actual emails were replaced with to@email.com and from@email.com
When I make an outbound call, the email is never sent, but in the logs I see this error:
My actual ip address was replaced with 1.1.1.1
I checked send_mail.lua on line 240 and the code is:
I'm not sure where to go from here. Any help is appreciated!
I'm using the example here (see the screen shot): https://www.pbxforums.com/threads/change-outbound-caller-number.2731/post-7769
In an outbound dialplan I have the tag set to action, the type set to lua and the data set to email.lua to@email.com from@email.com ' ' 'Test Email' 'Test Body'
The position of the dialplan entry is right before the bridge to the gateways.
My actual emails were replaced with to@email.com and from@email.com
When I make an outbound call, the email is never sent, but in the logs I see this error:
Code:
e1be75b7-5ba0-4e60-adfc-913605613025 EXECUTE [depth=0] sofia/internal/100@1.1.1.1 lua(email.lua to@email.com from@email.com Test Email Test Body)
e1be75b7-5ba0-4e60-adfc-913605613025 2022-02-22 16:28:28.284341 97.87% [ERR] mod_lua.cpp:202 ...are/freeswitch/scripts/resources/functions/send_mail.lua:240: bad argument #1 to pairs (table expected, got string)
My actual ip address was replaced with 1.1.1.1
I checked send_mail.lua on line 240 and the code is:
Code:
for k,v in pairs(headers) do
xheaders = xheaders .. ('"%s":"%s",'):format(k, v)
end
I'm not sure where to go from here. Any help is appreciated!