Why is s the d' necessary?
Because the French expression is:
"oublier de comment/faire/pourquoi" => "to forget how/to do/why".
why do not accept " n'oubliez pas " I think it is also correct
I don't see a mistake. You may want to report if the remainder of the sentence is also correct.
Surtout, n'oubliez pas d'envoyer la pièce jointe. was just accepted.