Email attachment fixed, cron added, profile field and custom fields criteria added