Added Email resource code

Support for emails with resources. Only resources that are actually used are included, to avoid the .bin file attachments in Outlook.