I'm using xpermailer to send direct to an MX server. This works well and is only being used on a local server to send to very specific addresses.
It is working and I have no major issues with it, but I'd like to change the helo
that is sent. Currently it sends 127.0.0.1
but I'd like to to send the name of the device it is running on LanServer1
Reading the docs for expert mailer I can add the name to be used in the mxconnect
function.
SMTP :: mixed mxconnect ( string hostname [, integer port [, integer timeout [, string name [, resource context ]]]] )
However when I do this I always get the error:
Error: invalid name value on SMTP::mxconnect()
Looking through the code it appears it is validating the value entered to be either a valid IP Address or DNS hostname, as LANServer1 isn't either it fails. Changing the value to be my static IP Address and it works fine.
The line doing the validation is:
if (!($host != '' && ($host == 'localhost' || FUNC::is_ipv4($host) || FUNC::is_hostname($host, true, $debug)))) $err[] = 'invalid host value';
Does anyone have any idea how I can sort this so it does send LANServer1 and not 127.0.0.1
Thanks
I've sorted this by added my host name in the code doing the validation.
This has allowed me to send messages to remote servers and it all seems to be working.