I have a server with one network interface with two IPs. How can I set exactly one IP to be used for SMTP transport? I am using php library Swiftmailer. Thanks in advance!
Try this:
$transport->setLocalDomain('[127.0.0.1]');