now using path and __dirname for reading the config files and email templates