Made parsing of attachments node in XML more robust by allowing content and mime-type nodes to be declared in any order.
Made parsing of 'to' node in XML more robust by allowing smtp-address and display-name nodes to be declared in any order.