All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Whoever repents to Allah, Allah forgives him, no matter how great his sin is. Allah Says (what means): {Say: O my Servants who have transgressed against their souls. Despair not of the Mercy of Allah: for Allah forgives all sins: for He is Oft-Forgiving, Most Merciful.} [Quran 39:53]
Also, the Prophet said in a Qudsi Hadeeth, that Allah said: “O Child of Adam! If your sins reach the highest point in the sky (the greatest they could be) and you ask Me for forgiveness, I will forgive you and I do not mind.” [at-Tirmithi]
The fact that a woman writes a letter to a non-Mahram man and talks to him is considered minor Zina (adultery or fornication), which leads to major Zina. The Prophet said:
“The child of Adam has to have his share of Zina (adultery or fornication) no matter how well he/she endeavours to avoid it. The Zina of the eyes is by gazing, the Zina of the ears is by listening, the Zina of the tongue is by talking, the Zina of the hands is by touching, the Zina of the foot is by walking [to forbidden places], and the heart desires and wishes. Then, the private parts either submit to this or deny it.” [Muslim].
The person who commits the above stated kind of Zina is not given the Hadd (i.e. the corporal punishment determined by the Islamic Law) for it.
But the person who commits it should repent from it and seek the forgiveness of Allah from the sin he committed.
On the other hand, the woman who happened to commit such a sin, does not have to inform her husband; she should instead conceal herself. It is not necessary to tell the husband. Repentance from this sin or any other sin requires the following:
* The person gives up the sin completely.
* The person feels deep sorrow for the sin he/she committed.
* The person has firm resolution not to go back to this sin again.
* The fourth condition is to return or restore any rights he/she took or abused to the one from whom he took those rights or abused them.
As for the claim that Allah "will not forgive a particular sin", this is but Satan's insinuations.
Indeed Allah forgives all sins of people who truly and sincerely repent from their sins even if such sins are Shirk (polytheism), let alone minor sins like the one that you mentioned in the question.
Moreover, your committing this sin does not cause a rejection of your good deeds (prayers, fasting, etc.). On the contrary, if you repent sincerely, the sins turn into good deeds. Allah Says (what means): {Except those who repent and believe (in Islamic Monotheism), and do righteous deeds; for those, Allah will change their sins into good deeds, and Allah is Oft-Forgiving, Most Merciful.} [Quran 25:70]
Allah knows best.