1. Even when the woman’s husband is in the same town at the time, yichud-seclusion is forbidden if the man and woman are on somewhat friendly terms libo gas bah, “he is comfortable with her”], such as when she grew up with him or she is a relative of his (Shulchan Aruch, Even HaEzer22:8). This is also a common issue with a secretary, an assistant, housekeeper, or a woman who has an ongoing business relationship with a man, or in any other similar relationship. In this case seclusion is forbidden even when her husband is in the same city.(Shevet HaLevi 5:203)
2. Even a woman whose husband is in the same city may not be alone with a gentile.(Chida in Sha’ar Yosef 3)

