Added email attachment patch