Currently we try and read the hostname, but it is often not set when the PDF are sent via cron.
Instead, we could record the Piwik hostname in the _option table if it is not there (similar to the get latest version entry).
Then we can reuse it in the Mail class to set domains in emails.
Note that the domain should be overridable in the config file.
actually, no ;) this is enough: http://piwik.org/faq/troubleshooting/#faq_110