Unable to use sc_mail_send in external library

I get an error call to unknow function when doing the function call.
I have setup a function called email_users($to,$message,$subject) in an external library. This library has the macro “Send a simple email” which includes the sc_mail_send(…);
when I call the procedure email_users($parms) I get the error

Fatal error : Uncaught Error: Call to undefined function sc_mail_send() in …

Any suggestions where I am going wrong. Must be something very simple I just don’t see

Scriptcase macros are not replaced in external libraries. I.e. you cannot use them.

Either use an internal library or use something like phpmailer for sending emails.

Regards

Gunter Eibl

Thank you for the clarification. Now I understand why I was have such fun