So if a user doesn't specific email address, it should just move on - from this logic, it appears as if it would log a warning message, where there really should be done because email notification is just an option. One suggestion - only run sendEmail() if both emails are enabled and user specifies email address.