In the third and fourth generations (specifically D/P/PT in this case, I believe) of Pokémon, Mystery Gift/Mystery Event was not there by default. The phrases differ between versions.
In R/S, you need to talk to a woman in Petalburg City, and enter this phrase: MYSTERY EVENT IS EXCITING.
In Emerald and FR/LG, you need to answer a questionnaire at any Pokemart, and enter this: LINK TOGETHER WITH ALL
In D/P/PT, you need to speak to a man on the third floor of Jubilife TV and say: EVERYONE HAPPY WI-FI CONNECTION
Unlocking Mystery Gift via a special phrase has been dropped as of HeartGold/SoulSilver, and has been available by default.
Did you bother to unlock Mystery Gift in these Pokémon games? I did, because I did go places to get event Pokémon back in the day during Generation IV. I still wonder why they made you input a phrase just to unlock the ability to receive special Pokémon, though.