private void button22_Click(object sender, EventArgs e) { FileStream fs = new FileStream("C:\\Azzure\\ellisonEuropeLogo.gif", FileMode.Open, FileAccess.Read); // Create a byte array of file stream length byte[] ImageData = new byte[fs.Length]; //Read block of bytes from stream into the byte array fs.Read(ImageData, 0, System.Convert.ToInt32(fs.Length)); //Close the File Stream fs.Close(); string strBytes = System.Convert.ToBase64String(ImageData); Magento_Version2_NAV_Integration_Sizzix.MagentoVersion2Helper mage = new Magento_Version2_NAV_Integration_Sizzix.MagentoVersion2Helper(); mage.submitInteractionToMagento( // "https://sizzix-b2b.c3preview.co.uk/soap/b2b_gbp?", "https://sizzix-b2b.c3preview.co.uk/soap/all?", "Azzure", "2dmwyw8MghwFeN", "503609", "Chris Test", "This is the subject with attachment", "This is the body with attachment", strBytes, "Ellison Logo", "gif"); }