When I have a link to a node in subdomain the base url is added again to a full url in the bulk mail. Not in the test mail.
For links to subdomain nodes I use the option absolute = true in function url().

Link in the last test mail:

Goutier en Peters: <a href="http://goutierenpeters.photonmagazine.eu/matthijs-van-roon-en-bmw-flitsgeneratoren-op-locatie" style="color:#c54745;text-decoration:none;">Matthijs  
van Roon en BMW: Flitsgeneratoren op locatie</a></p>

Link in the 1 minute later send bulk mail:

Goutier en Peters: <a href="http://goutierenpeters.photonmagazine.euhttp://goutierenpeters.photonmagazine.eu/matthijs-van-roon-en-bmw-flitsgeneratoren-op-locatie" style="color:#c54745;text-decoration:none;">Matthijs  
van Roon en BMW: Flitsgeneratoren op locatie</a></p>

As you can see, the http://goutierenpeters.photonmagazine.eu is doubled.

I saw more issues like this in the past. I wonder why this problem is popping up again with new releases.

Comments

promes’s picture

How is it possible a test-mail is different from a bulk mail!

miro_dietiker’s picture

Status: Active » Postponed (maintainer needs more info)

Report, how you run cron.

Cron is called differently than the testmail is called: Testmail is via browser, apache, URL... While cron is called via..?!

The system tries to protect against relative links without a domain. It looks like here, the system thinks this is a relative link that needs to be prefixed with the domain to make the link work. I have currently no idea why this happens in cron and not via browser. You'll need to tell us much more about your setup to REPRODUCE that.

promes’s picture

Thanks for your request. I create the list of mailadresses to send the mailing online via example.com/node/999/simplenews.
Afterwards I run cron manually via the url example.com/cron.php as many times as needed.

remarks
1. I don't know why the testmail isn't generated with the same function as the bulkmail. There will be a reason. But I think it both the mails should be equally generated. Otherwise the testmail is of less value.
2. I didn't dive into the code (lack of time). But a test if a link start with http should prevent the problem.

This module is of great value. Thanks for your work.

miro_dietiker’s picture

It's the same code.
The difference is drupal ... because drupal doesn't provide exactly the same environment for cron and a web request... drush is even more different for some aspects.

You'll need to dive deeper into that. Cannot reproduce.