Contact form: moved message generation before meta setting

The message is required in order to properly set the post meta. This
fixes failing tests.