Did not receive email when i register for an event

No there isn’t a setting to write the email message to an email file. But you could patch the code to write the email to a file before trying to send it:

diff --git a/indico/core/emails.py b/indico/core/emails.py
index b58413963f..6c5daf37c7 100644
--- a/indico/core/emails.py
+++ b/indico/core/emails.py
@@ -123,6 +123,8 @@ def do_send_email(email, log_entry=None, _from_task=False):
         if email['html']:
             msg.content_subtype = 'html'
         msg.extra_headers['message-id'] = make_msgid(domain=urlsplit(config.BASE_URL).hostname)
+        with open('/tmp/msg.eml', 'wb') as f:
+            f.write(msg.message().as_bytes)
         msg.send()
     if not _from_task:
         logger.info('Sent email "%s"', truncate(email['subject'], 100))

This is untested though.