Change password for email created under domainl.com

Yes, that is what a null client will provide for you and all you have to do is call the “standard” MTA on the external server, which is sendmail which just means using any of the available options for everything using Linux to send mail. Hence the Just Works™.

I’m not saying it is the only or even the best way to send mail when using an external server, it is just a very easy and reliable way because it basically works as if there is a mail server on the local server.

I following this relay steps Mail-in-a-Box Advanced Configuration Guide
but it shows Sender address rejected, any idea on this?

I haven’t used PHP for a long time now, but why don’t you just use your mailinabox credentials to send from PHP directly?

Just enter your smtp username + password

It looks like you didn’t follow the instructions completely.