Modernize flask mail import