setting email type before either insert, fixes #6681