E-mail sent from Orthanc

Hi Everyone,
I am taking an instance of Orthanc into production and as such need some sort of notification service to report images being received and passed through. I am attempting to use the following Lua script lifted from Iguana and modified for my own settings but I don’t think Orthanc understands the net.smtp.send function because whenever it receives a series, it fails to send the e-mail saying the variable ‘net’ is a null value.

– Set up the parameters to be used with sending an email

  1. local smtpparams={
  2. header = {To = ‘sales@interfaceware.com’;
  3. From = ‘’;
  4. Date = ‘Thu, 23 Aug 2001 21:27:04 -0400’;
  5. Subject = ‘Test Subject’;},
  6. username = ‘’,
  7. password = ‘’,
  8. server = ‘’,
  9. – note that the “to” param is actually what is used to send the email,
  10. – the entries in header are only used for display.
  11. – For instance, to do Bcc, add the address in the ‘to’ parameter but
  12. – omit it from the header.
  13. to = {‘sales@interfaceware.com’,‘admin@interfaceware.com’},
  14. from = 'Test User ',
  15. body = ‘This is the test body of the email’,
  16. use_ssl = ‘try’,
  17. –live = true – uncomment to run in the editor
  18. }
  19. net.smtp.send(smtpparams)
    Is it because Orthanc doesn’t have access to the function and do I have to include something to make it recognise it?

Best Regards,
Dave the 2nd

Hello,

Precompiled binaries of Orthanc come with a static Lua engine that comes only with the core libraries (that don’t contain “net”).

Please check out discussions about the “-DENABLE_LUA_MODULES=ON” configuration option in this forum to learn how to load external Lua modules:
https://groups.google.com/forum/#!msg/orthanc-users/BXfmwU786B0/M47slt5GFwAJ

HTH,
Sébastien-

Excellent, thank you very much Sébastien! I’ll give those pages a read.

Dave.