A woman from Cardiff agreed to marry a foreign student in a sham marriage to "pay her rent".
Sharon Creaghan, 45, a mum of three, was about to marry a Pakistani student in a register office for £1,400 when police and Border Agency officials intercepted.
Cardiff Crown Court heard how Creaghan had not even told her teenage children she was about to wed Naseer Awan.
Creaghan had a "crib sheet" at home to remember facts and details about the 34-year-old groom's life and family.
Prosecutor John Probert said: "Officers discovered a marriage had been booked at Cardiff registry office in the name of Awan.
"At 11.15am they found the prospective bride and groom and a number of guests. After short interviews with guests both the bride and groom were arrested."
Creaghan and Awan, both of Cardiff, admitted conspiracy to facilitate the commission of a breach of immigration law.
Janet Treharne, defending Awan, said he had tried to get permanent residency in the UK through the marriage so his sick nine-year-old Pakistani son could get treatment on the NHS.
Creaghan was sentenced to 32 weeks in jail, suspended for 18 months, and ordered to carry out 150 hours unpaid work in the community.
Awan was jailed for 12 months and was told the Border Agency will then look into him being deported to Pakistan.