email api should use config_get to retrieve path

This avoids accessing the $g_path global directly