Eli Cohen was killed in 1965 and the Six Day War commenced in 1967. Two years feels like an appreciable gap for gathered intelligence to have dated.
Eli Cohen's contributions were many and varied. Cohen was so skilled at infiltrating the Syrian government that he became friends with Syria's President, sketched and noted Syrian fortifications, and even passed along military plans. Cohen was an exceptional spy, with an exceptional background. Israel had another that was similarly situated to some extent in Egypt, Wolfgang Lotz in Cairo. Both men were lost within 5 weeks of one another in 1965.
Cohen was fluent in numerous languages. He knew Arabic, French, and Hebrew, and had previously spied in Egypt, but was captured and arrested. The Egyptians couldn't find evidence that he was actually a spy, though he was arrested with the rest of a spy ring, so they eventually let him go. Cohen had already had intelligence training and history in that affair, but was further trained for another 6 months to ensure he could handle a deep-cover, long-term assignment. His main job was not to spy and gather information on military matters, necessarily; his job was primarily to serve as a warning light, and let Israel know if war was approaching. He studied the Quran and Islam, brushed up on languages, and was put through plenty more to ensure he could fit seamlessly into Damascus.
He went to Argentina, through which many Israeli spies often routed, and received a new identity as a Syrian businessman who was born in Lebanon. He was "wealthy", flaunted it, and managed to make friends with the upper echelons in Syria quite easily as a result. Still, he lived in South America for quite some time doing so, only moving into Syria in 1962, over two years after he'd been recruited for this task. That was how deeply they set up his background and identity. Of course, it didn't hurt that the Syrians he knew in Argentina were more than happy to write him letters of introduction and help him set up in Syria, not knowing his true identity after all. He was a quite skilled social animal, in that sense. With all the recommendations out of Buenos Aires and all the folks vouching for him, he was quite busy quite quickly meeting anyone who was anyone in Damascus.
Guess what? He didn't become friends with Amin al-Hafiz out in Syria. He actually became his friend in Argentina. When Hafiz became President of Syria, Cohen was running his business out of Syria. Yeah, he set up a full on import-export business as a cover, and the Israeli government helped fund his "success". He met with military leaders in Syria, visiting facilities, memorizing bunker locations and information that would prove very handy in the Israeli plans on attacking Syrian fortifications, which Israel did use extensively. He told Israel who Syria's pilots were, what their planes were armed with, what types of tank traps Syria had, etc.
Israeli intelligence, as one book puts it, "was able to get a remarkably complete picture of an enemy country that had seemed impenetrable".
That same book also notes a funny coincidence: Israel had tasked Maurice Cohen, Eli Cohen's brother, as the communications officer who was receiving and decoding the Morse Code transmissions Eli sent out of Syria. Neither one knew the other was on the other end of the line. In fact, Maurice Cohen thought his brother Eli was working for the Defense Ministry in getting computer parts abroad, even as Eli was working in Damascus.
Cohen eventually began to mention that he was tired of this in 1964, and said he might want to end his time abroad. He told his handlers he thought some folks were also starting to get suspicious of him, including the Syrian army's head of intelligence. No one paid him nearly enough mind. Cohen eventually started sending so much information that people started to notice. Eventually he was caught mid-transmission, by folks who had been monitoring the radio waves and saw the huge amount of traffic.
Cohen was hanged less than 6 months later. His body was never recovered; Syria has refused to turn over his remains. Incredibly, it was Israel wanting more information, and the fact that he was so good at gathering the information, that led to his capture and death.
How helpful was what he did, then? After all, as you said, there were around 2 years (2.5, to be more exact) between the capture and the war. Some argue that he was broken and revealed the code that showed what he'd sent in all his messages. Yet others talk quite extensively about how much an effect he had on the war, and list it as a very large effect.
Ian Black and Benny Morris claim that his contributions were overstated, but don't doubt that his information on locations and bunkers were extensive. Clearly, whatever the Syrians thought, they didn't invest in altering much of it. That likely is because they didn't think it would matter; Syria thought if a war was launched it would be on their accord, that they wouldn't fake Israeli proactive action, and perhaps they even figured that the information was not actually as accurate. They may not even have known the full extent. Unfortunately, it's hard to know; we have few insights into what was really said to the Syrians, but most historians seem to agree that Cohen's contributions were used as guides by Israeli forces and were indeed accurate, for whatever reasons.
At the same time, the eucalyptus trees thing seems to be unverifiable. It's a myth that's apocryphal at this point, but there's little hard backing for it. The myth, for those unaware, is that Cohen persuaded Syrian military leaders out of "sympathy" for Syrian soldiers to plant eucalyptus trees at their positions and give them shade. Since those trees aren't native to the area, the thinking is that he did this and gave Israel clear markers for Syrian positions.
Accurate? Maybe. If it happened, it didn't seem to play much part. The battles themselves don't seem to show Israel shooting fish in a barrel because they have all troop positions; bunkers and the like perhaps, but not all troop positions like that. Planes could and did find the troop positions anyways, and were far better than eucalyptus trees; it's not like the Syrian troops always just stood around, particularly after the first strikes. And like I said, there's not really a whole lot of evidence that this was actually done at all. It may just have been an excuse given for how Israel found fortifications that they'd actually managed to get through Cohen's observations and aerial reconnaissance of their own.