integrate php mailer into core