This is the email call:
action.email ( sReceiverAddress, sSubject [, sBody ]] )
Generates an email-message targeted for the NimBUS Email Gateway. Returns true when successful.
Not seeing your whole script, it's hard to tell if that's all there is.
The fact you are not seeing your print line indicates a syntax error
And I'd write this more like
print ("function SendMail DEBUG")
local arguments = SCRIPT_ARGUMENT
If (arguments == nil) then
arguments="test arguments that work so you can test interactively"
end
action.emal(..with arguments..)
Original Message:
Sent: 10-29-2020 07:29 AM
From: Eivind Olsen
Subject: Problem with a script
I have problems getting a LUA script to run. It is defined with an auto operator profile in the nas service/probe. Action type =script, Action category = Email.
The activity log indicates that the script is being run, but all the lines in that log are red, with status = 1.
The script itself begins with the line:
print ("function SendMail DEBUG")
But I don't seet that line getting printed in the nas logfile.
After that introduction comes a definition of the function SendMail, followed by a block:
If (SCRIPT_ARGUMENT) then
SendMail(..with arguments..)
else
print ("Argument NOT set or faulty")
end
I don't see that line getting printed either.
What might be causing this problem? I'd have expected to at least see the first print-output in the nas.log, but perhaps I shouldn't expect that?
Med vennlig hilsen,
Eivind Olsen
Teknisk konsulent
NetNordic Communication | Conrad Mohrs veg 23, 5072 Bergen | www.netnordic.com |
Telefon: +47 56 09 40 12 | Mobil: +47 416 49 322 | eivind.olsen@netnordic.com |