Fixed error when sending confirmation emails with no email #5735