Online Chat
 Call Us: 
Browse Submit a Ticket
Advanced Search
Rss Categories

Why "localhost" is always refered in the emails sent by KMP?

Author: Edward Hardin Reference Number: AA-00609 Views: 7661 Last Updated: 12/20/2010 04:49 PM 0 Rating/ Voters

It happens that an email that contains a link to an article sent by KMP has URL that you cannot open. For example it has "localhost" or "" as domain name. It is possible due to KMP doesn't have a hard-coded setting that has current domain name. Instead it detects the domain name each time on the fly. This allows you to simply move KMP to another domain, or use multiple domain aliases.

There are two solutions to this problem. Right solution for you depend from what emails have incorrect links:

Emails sent manually

When you send an email from a KMP page manually (e.g.: via "Email to a Friend" form),  it inserts the same hostname to the URL as one in the address bar of your browser. For example if you're sending an email from a page on, it will have the article URL with "" domain.

However, if you opened KMP from a local server ("localhost"), the email will have URL with "localhost" for domain, e.g.:


Email sent automatically

The domain part of the URL is taken from the second parameter of the cron job command.

e.g. for Linux/Unix:

* * * * * /usr/bin/php /usr/www/kmp/admin/CRON/cron.php http://localhost/

e.g. for Windows (cron.vbs):

WinScriptHost.Run "C:\PHP\php.exe c:\inetpub\wwwroot\kmp\admin\CRON\cron.php http://localhost/", 0

Solution is the same for all systems - replace "localhost" with correct domain name:

e.g. for Linux/Unix:

* * * * * /usr/bin/php /usr/www/kmp/admin/CRON/cron.php

e.g. for Windows (cron.vbs):

WinScriptHost.Run "C:\PHP\php.exe c:\inetpub\wwwroot\kmp\admin\CRON\cron.php", 0