emails now sending correctly