Fix mail function again