She forgot to mail the letter.

Literal

She [topic-は] letter [object-を] mail [nominalizer-の] [object-を] forgot.

~のを忘れる (to forget to do X) nominalizes the action with の and marks it as the object of forgetting with を. 投函する (とうかんする) is the specific word for dropping mail into a mailbox — more precise than 送る (to send) or 出す (to put out). The double を (手紙を投函するのを) is grammatically standard: the inner を belongs to the embedded clause, the outer を to 忘れた.