Mishloach Manot to Man or Woman

If a male drops a mishloach manot off and only a female is there to receive it, is he yotze for the mitzvah? Or must he make sure he gives it to another male? (for Sephardim, if it makes a difference)

If it’s for her husband or to their family you can hand it to her, one shouldn’t give specifically for her.