Enable sending email after creating key
Cleaned up some issues