Email URL

BrianHess

New member
Good Evening,

Hoping someone can help me figure this out. When sending an email to a newly registered member, it's giving the local IP address in the email, not the DNS name.

I've looked around and cant figure it out. I added the Site URL to the custom_config.php, but that didn't help.

Appreciate any help

System info​

PHP Version: 7.4.3

mysql version: 8.0.28-0ubuntu0.20.04.3

Web server: Apache

Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36 Edg/99.0.1150.39

URL installation: http://192.168.2.101//
 

eugenio

Administrator
Staff member
Hello Brian,
the URL used in the email should be the one the user was using: if the user to access your app is using the IP address, the IP address will be used.

Best,
 

BrianHess

New member
Eugenio,

Thanks for the quick reply. Unfortunately, that didnt work. We logged into the DNS name and we are still getting the local IP. Now we are going thru a reverse proxy, would that make any difference?
1647269842893.png
 

eugenio

Administrator
Staff member
Hello,
it seems that the client, when visiting your site, makes a request with the IP, or at least this is what PHP sees in $_SERVER['HTTP_HOST'].

This is the code used by DaDaBIK to build the URL you see in the message:

http".(isset($_SERVER['HTTPS']) ? 's' : ''). '://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'

Best,
 
Top