Changing database end mailer structure