I have written a php function that sends a notification email when a certain edit form is saved. This function is saved in the Code Library so I can use it from any form as needed. The lines below show a snippet from my function ...
Code: Select all
$mail->Host = "192.168.0.6";
// $mail->Host = $NUSMTPHost;
I wanted to use the $NUSMTPHost variable from config.php so the host address is only set in the main config file. But I don't seem to be able to get this variable from inside my Library Code function. I tried putting the line
require_once("config.php"); at the top of my function but this did not seems to work.
What am I missing here?