When the portal Virtual Hosts is domain.com and in the Site config the public Virtual Hosts is set to public.domain.com, the links to the content created utilizing the liferay-ui:discussion taglib are incorrect when sending email notifications.
This is caused by utilizing the PortalUtil.getCanonicalURL method in the
https://github.com/liferay/liferay-portal/blob/6.2.x/portal-web/docroot/html/taglib/ui/discussion/page.jsp for the contentURL attribute.
This method returns the base portal URL ignoring that Site settings. In my opinion this should be fixed inside getCanonicalURL, not in the taglib itself as there might be other occurrences of similarly broken links (I am experiencing this issue as well https://issues.liferay.com/browse/LPS-45459 which has most likely the same root cause).
Another one seems to be related as well: