Fix error closing issue with no email accounts.

Project ID will be taken from issue ID instead. Closing comments are not displayed since emails are hidden if there is no email account.

This behavior is better then previous runtime error but still not perfect. We could either:
a) always add a dummy email account when creating a project.
b) always display the email section, just hide the "send email" button if there is no account setup.