fixes to parse email date in publish function