Function to receive mails and show in template