E-mail ralated code extracted from IPF Web Framework