It is an undeniable fact that Senator Tom Cotton sent an open letter to Iran to which the Iranian responded. As to whether that constitutes treason, here is an analysis by Kathleen DuVal, an associate professor at the University of North Carolina, Chapel Hill:
Senator Tom Cotton's letter addressed to Iranian leaders, warning them about making a nuclear deal with President Obama, came as a surprise to many Americans. But it would not have surprised our earliest forefathers. After all, it was not uncommon, in the years immediately following the American Revolution, for individual Americans to negotiate directly with representatives of foreign governments.
Back then, individual Americans independently committed forces to foreign wars. In 1793, the French emissary, Edmond-Charles Genet, recruited citizens in South Carolina to raise forces to fight with the French against Britain and Spain. In 1797, Senator William Blount of Tennessee plotted to invade Spanish Florida with help from the British.
Increasingly, Americans began to see alternative negotiating as treason. President George Washington and his secretary of state, Thomas Jefferson, put a stop to the French emissary Genet’s recruiting, and Senator Blount left the Senate under threat of impeachment. When, in 1805, Aaron Burr, right after serving as Jefferson’s vice president, conspired to seize Spanish lands and possibly establish an independent republic, Jefferson declared Burr a traitor and ordered his arrest. Burr was acquitted, but Americans generally agreed with Jefferson that, if Burr had done what he was accused of, he was a traitor.http://www.nytimes.com/2015/03/13/opinion/a-history-lesson-for-the-republicans-who-wrote-to-iran.html