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
try
If ToLine is empty or FromLine is empty or SMTPhost is empty then
throw “Missing fields”, “Missing requared field(s)”
else
try
sendmail (to Toline,
from FromLine,
subject SubjectLine,
body MesageBody,
smtp_hostSMTPhost,
attachment AttachedFile)
catch myException
log “Error ocuurs during email sending”
end try
end if
end try
end SendingEmail

How to resolve the issue?
Thanks.

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.