We are accessing moodle through different links (one for local use and one over internet).
It has never been officially supported. In older Moodle versions, even files serving did not work in such a scenario. It is generally better to have a single domain name to access your moodle host. It is possible to configure your local DNS so that for intranet users it returns one IP and for external internet users it returns another one.
In these emails, Moodle uses the value of $CFG->wwwroot
defined in config.php to generate the link to itself.