This woman has to repent to Allaah from the sins and evil actions that she has committed, regret that deeply, resolve never to do it again, and do as many righteous deeds as she can, because Allaah says (interpretation of the meaning):
“And verily, I am indeed forgiving to him who repents, believes (in My Oneness, and associates none in worship with Me) and does righteous good deeds, and then remains constant in doing them (till his death)”
1 – The Islamic ruling on that is clear: zina is an immoral action and a major sin, and a reprehensible crime for which a person deserves the curse, anger and wrath of Allaah for transgressing His sacred limits; and deserves His punishment in this world by being given one hundred lashes if he or she is not previously-married, and being stoned to death if he or she was previously-married. We ask Allaah to keep us safe and sound.
But whoever commits any such action then repents sincerely to Allaah, his bad deeds will be turned to good deeds. Allaah says (interpretation of the meaning):
“And those who invoke not any other ilaah (god) along with Allaah, nor kill such person as Allaah has forbidden, except for just cause, nor commit illegal sexual intercourse and whoever does this shall receive the punishment.
69. The torment will be doubled to him on the Day of Resurrection, and he will abide therein in disgrace;
70. Except those who repent and believe (in Islamic Monotheism), and do righteous deeds; for those, Allaah will change their sins into good deeds, and Allaah is Oft-Forgiving, Most Merciful”
2 – With regard to her marriage to a Muslim man, if it was done after she repented and established that she was not pregnant as a result of zina, then there is nothing wrong with that, otherwise it is haraam, because it is not permissible to marry a woman who is known to have committed zina until after she has repented and established that she is not pregnant by waiting one menstrual cycle, according to the most correct scholarly view. The Hanbalis and Maalikis are of the view that she should establish she is not pregnant by waiting three menstrual cycles, as in the case of a woman who is divorced by talaaq. The former view was narrated from Ahmad (may Allaah have mercy on him) and was favoured by Shaykh al-Islam Ibn Taymiyah (may Allaah have mercy on him), and is supported by the report which speaks of establishing that a female prisoner of war (i.e., a woman captured by the Muslim army in a war against the kuffaar) is not pregnant, which was narrated from Abu Sa’eed al-Khudri (may Allaah be pleased with him) who said that the Messenger of Allaah (peace and blessings of Allaah be upon him) said concerning the female prisoners of Awtaas: “No one should have intercourse with a pregnant (concubine) until she has given birth, or with one who is not pregnant until one menstrual cycle has passed.” Classed as saheeh by al-Albaani in Saheeh Abi Dawood.
The benefit of establishing that she is not pregnant by waiting one menstrual cycle is to ensure that she is not pregnant as a result of zina, so that the “water” (semen) of marriage will not be mixed with that of an immoral relationship.
If he married her during the time when it had not yet been established whether she was pregnant or not, then the marriage should be annulled until that has been established, after which he may marry her if he wants.
3 – With regard to the ruling on the children, doubts apply only to the first pregnancy after the marriage. If she gave birth to a child after less than six months from the date of the marriage, then according to sharee’ah the child cannot be attributed to the husband or named after him, because that falls short of the minimum length of pregnancy which is six months.
If she gave birth six months or more from the date of the marriage, then the child should be attributed to the husband and is regarded as his son, even if she married without having repented or establishing that she was not pregnant, so the child should be named after the husband in this case.
See al-Mughni, 7/108; al-Fataawa al-Kubra by Ibn Taymiyah, 3/176; Mawaahib al-Jaleel, 3/413
It should also be noted that the basic principle concerning the phrase “Peace be upon those who follow true guidance” is that it should be said to a kaafir when writing to him, not to a Muslim.
It says in Kishshaaf al-Qinaa’ (3/130): If a person writes a letter to a kaafir and wants to include a greeting in it, he should write “Peace be upon those who follow true guidance”, because that carries a comprehensive meaning.
The Prophet (peace and blessings of Allaah be upon him) used to use this phrase when he wrote to the kings around him such as Chosroes, Caesar and al-Muqawqis.
And Allaah knows best.