ERROR: No Such Command: '<initialhandler>'

Got “Selection Failed in 00000 STUnknownMessage ERROR No Such Command ‘’” when run a handler fron another script as

run SendingEmail of EmailSend ToLinein, FromLinein, SMTPhostin

Handler SendingEmail is
to initialize

end initialize

to SendingEmail ToLine, FromLine, SMTPhost, SubjectLine, MessageBody, AttachedFile
If ToLine is empty or FromLine is empty or SMTPhost is empty then
throw “Missing fields”, “Missing requared field(s)”
sendmail (to Toline,
from FromLine,
subject SubjectLine,
body MesageBody,
attachment AttachedFile)
catch myException
log “Error ocuurs during email sending”
end try
end if
end try
end SendingEmail

How to resolve the issue?

Try it this way:

run EmailSend.SendingEmail ToLinein, FromLinein, SMTPhostin

or even simpler, call it without ‘run’:

EmailSend.SendingEmail ToLinein, FromLinein, SMTPhostin

Perhaps in the future we’ll allow using ‘handler of script’ too, but for now use ‘script.handler’ or ‘script’s handler’ instead.