Migrating into extension for batch mailer