in a woman especially when foul smelling suggests a urgenital infections. Causes could range from parasitic like Trichomonas vaginal, parasitic like Gardenerella vaginalis , the most common Candida albicans and some bacteria. At it, the infection ca be mixed.
Diagnosis required a good clinical examination and a vaginal swab, culture and sensitivity tests. In your case, due to the duration, its compelling you do these cytologic, culture and sensitivity tests for this vaginal discharge. This shall give exact causative agents and antibiotics that could be effective on them. The clinical examination might need to add other examination like an abdomino pelvic ultrasound
. Its routine practice these days to be offered a pap smear
to screen for cervical cancer
I would suggest you avoid unprotected sex for the moment and book a visit with the gynecologist. Discussing the issue with your husband and getting him consulted for a couple counseling and maybe treated as a couple, if need be, could be important in reducing reinfection. Untreated or poorly treated urogenital infections could have negative consequences on fertility
and other chronic disease like tubo ovarian abscesses and extra uterine pregnancies. Seeing a gynecologist is a reasonable option.
Thanks and I hope this helps,