added posix module to email fuction, should make that work again