Hello stefaniek,
Welcome to the HP Support forums. I understand that you are getting a "Scan Failure" message on your Envy 5530 printer when trying to use the scan to email feature.
To better assist you, would you please provide some further information:
1) Have you tried resetting the printer? If not, please follow the steps in the document Resetting the Printer.
2) Did you customize your printer's ePrint email address? If yes, are you able to print off a Web Services information sheet showing the printer's ePrint email address? The instructions can be found in your User Guide on page 30 in the 'TIP' found in the section titled "To ePrint a document from anywhere".
3) Have you set a manual ip address and DNS servers for the printer? You can do this from any device (Smartphone, tablet, desktop computer, laptop, etc) that can connect to your wireless network. The steps can be found in the document titled Printer Does Not Maintain Wireless Connection. Please look for "Solution two: Assign the printer an automatic static IP address" and follow the steps listed there, except for the value for the DNS servers. For the Manual Preferred DNS servers please use 8.8.8.8 and for the Manual Alternate DNS Server please use 8.8.4.4.
Thank you.