cPanel-hosted mail typically sends through Exim, the mail server cPanel/WHM ships with by default — routing it through the gateway is a WHM-level change, made by whoever administers the server, not something available from an individual cPanel account.
- In WHM, go to Service Configuration → Exim Configuration Manager → Advanced Editor.
- Add (or edit) a
smart_routerouter that forwards outgoing mail to the gateway's inbound server as a smart host, with authentication credentials for your gateway account. - Save and restart Exim from Service Configuration → Service Manager.
- Send a test message from a mailbox on the server to confirm it now routes through the gateway.
See Exim for the underlying configuration this builds on, if you're comfortable editing Exim's configuration directly rather than through WHM's interface.