Got all emails working. fixed many things