Hi

My site members are getting emails that say this:

To read your message, follow this link:
http:///privatemsg

If you don't want to receive these emails again, change your preferences
here:
http:///user/18/edit

Do I need to be setting the base URL for my site somewhere in the module?

Thanks

Comments

salvis’s picture

The cause of this disease is unknown, but the cure is to set $base_url in settings.php.

In Subscriptions I've added

    if (empty($_POST) && (substr($url, 0, 8) == 'http:///' || substr($url, 0, 17) == 'http://localhost/')) {
      drupal_set_message(t('Your installation returns %url as the base URL of the site. This is probably not what you want, and it can usually be fixed by setting the %variable variable in your %file file.', array('%url' => $url, '%variable' => '$base_url', '%file' => 'settings.php')), 'error');
    }

to alert the admin to the issue. If Privatemsg were still using Subscriptions for sending notifications, it would get this for free. :-)

See #226335: Incorrect URL in Subscription Email.

litwol’s picture

Component: User interface » Code
Status: Active » Needs work

This seems like an ugly hack. lets find the real root of this problem.

salvis’s picture

Have fun!

:-)

berdir’s picture

Status: Needs work » Closed (won't fix)

Sorry for pinging the participants, I am closing old issues.

This version of Privatemsg is not supported anymore, maybe it is already implemented in Privatemsg for Drupal 6 and if not, you are welcome to open a new issue for it.