Electrochemical sulfur recovery from sulfide-containing wastewaters