25.01.2020, 17:43
(This post was last modified: 25.01.2020, 17:44 by Erwin van der Zwart.)
Hi,
You can call any function from common functions without loading the lib, so mail() should work when adding correct password and username. You probably need to enable “less secure apps” in your gmail account.
When calling a function from a user lib you need to load it first by require("user.yourlibname").
Right now you are calling the function ”email” but without loading it with require() and your function is Email() with a capital E and you are calling email() with a lower case e, script is case sensitive so this is also a reason why it does not work.
Why are you using the user lib for Email in the first place? I would use / adjust the one in common functions..
BR,
Erwin
You can call any function from common functions without loading the lib, so mail() should work when adding correct password and username. You probably need to enable “less secure apps” in your gmail account.
When calling a function from a user lib you need to load it first by require("user.yourlibname").
Right now you are calling the function ”email” but without loading it with require() and your function is Email() with a capital E and you are calling email() with a lower case e, script is case sensitive so this is also a reason why it does not work.
Why are you using the user lib for Email in the first place? I would use / adjust the one in common functions..
BR,
Erwin