How do I send the chat message to the whole server?
There's isn't a way to send a message to the whole server - the chat box will only send to everyone in the current dimension. In order to do that, you need to bump the chatSayRange config value to something absurdly high (the maximum is 2147483647).
If you're a server admin, you might be able to use command computers instead - just use the say/tellraw command directly.