Any citizen of the United States, who, without authority of the United States, directly or indirectly commences or carries on any correspondence or intercourse with any foreign government or any officer or agent thereof, with intent to influence the measures or conduct of any foreign government, in relation to any disputes or controversies with the United States, or to defeat the measures of the United States, shall be fined under this title or imprisoned not more than three years, or both.

The 47 Republican Congressmen who wrote a letter to the Islamic Republic's leader in opposition to President Obama most likely broke the Logan Law, but will not be prosecuted.