The current law, Chapter XIII, simply says that
a person who intentionally accesses or intercepts any data without
authority or permission to do so is guilty of an offence.
The law does not say what constitutes "authority or permission". "Sharing" an account typically constitutes giving permission to access the account. The most recent proposed update of the law, slightly clarifies that issue saying (Chapter II)
(3) For purposes of subsection (2),"unauthorised" means that the
(a) is not himself or herself lawfully entitled to secure access;
(b) does not have the lawful consent of another person who is lawfully
entitled to secure access; or
(c) exceeds his or her entitlement or consent, to secure access, to
data, a computer program, a computer data storage medium or a computer
Still, this does not clarify whether account-sharing constitutes limited permission to access the data. Since the issue here is whether criminal prosecution is possible, the law would need to be much clearer, that is, a person cannot be prosecuted for a crime based on a party saying "But I didn't think that she would actually look at the evidence of my infidelity".
It is unclear what the analog of the US exclusionary rule in SA, but it is unlikely that it would protect against using such evidence in a civil matter (such as a divorce) – it isn't excluded in US civil cases. There could be statutory exclusions (such as the common law that illegal wiretap evidence cannot be used in any court proceeding), but there does not seem to be any specific exclusionary provision in existing or proposed SA law.