A love movie during WWII that the woman was supposed to spy man

hi there is a movie i saw a few years ago please help me find its name. it happen during WWII . a woman is employed to spy on enemy for information about a probably german submarine location ( she had a guy friend don’t know if she employed through him or not) she was supposed to start a relationship with a german officer to gain the information but in the process, fell in love with him. after spending a while with the officer at his superior’s empty villa , she tell him the truth that the submarine is gonna be destroyed and beg him not to Boarding the submarine (he was supposed to be in it) but he didn’t listen to her I can’t remember his words but I guess he didn’t believe her. the next morning when she get up , she find out he already left. I can’t remember what happened after that but she gets caught for betrayal by their own soldiers and has been kept captive . her guy friend saves her and she goes to control room to stop the attack ( I remember the officers in control room didn’t speak english) but the officer who is in charge tell her it’s too late and the submarine is bombed while she’s crying and praying and the guy telling her she shouldn’t pray for enemy. after so many years the woman got old . she is been driving (a taxi) to a site (by a young woman maybe her daughter, telling her story to her) where the crashed submarine is taken out of water(it’s been deep in the sea till now) and the workers find a waterproof bottle containing a note . the woman read the note and we find out it’s written by the husband in his last seconds of life when the submarine is attacked and he finally finds out she was telling the truth. I think husband stated in note that he already forgive her , making the woman cry. I hope I didn’t get any part of the story wrong and unfortunately don’t even know the language of the movie ( movie was dubbed) I’ve been after this movie for a while now . would be great if you could help me

unfortunately i can’t remember. but its been more than 5 years . the movie didn’t look like being so old like belong to 50s I’m not sure but i guess it released after 2000. hope it help

Let’s try this one, although the plot appears to be different: