Unsuccessful authentication with SMTP Relay using server IP due to docker IP being different

Hi I am trying to figure out an issue with my application running in docker and exploring this as a potential reason it is not working.

I have an application running in docker that is trying to authenticate with an SMTP relay using IP
On the server itself I am able to send an email to the SMTP relay so I know the IP configuration on that end is okay, however when I try to do this inside the container it does not authenticate - my suspicion is that it is because the SMTP relay is seeing it as a different IP due to it being in the container - is this something that might happen?

I cannot access SMTP relay logs to see what is happening so I can’t confirm this is the case, but if it could be is there a way I can ensure my docker container is using the correct IP for successful authentication?

many thanks

Is the SMTP relay running on the same node?

nope different server entirely

But the container IP is usually private and the TCP packets are sent from the standard server public IP.