Details
Description
In CiviMail, when creating a mailing, if you set the Mailing Visibility to "Public Pages", then it should be possible to view the mailing as a web page when you're not logged in. However, that feature is broken in CiviCRM 4.4.4. Trying to view a mailing while logged out just produces a totally blank web page.
When this happens, an error is written to the CiviCRM log file: "CiviMail will not send email to a non-existent contact". This error is raised in CRM_Mailing_BAO_Mailing::compose - the function that generates the mailing output. It seems that the function cannot complete without the details of a specific contact, which are not present when the page is viewed as an anonymous user.
In version 4.4.3, it was possible to view a public mailing when logged out. This implies that the bug was introduced in 4.4.4.
Note: The URL for viewing a mailing is given by the
{mailing.viewUrl}token, and it looks like http://www.example.org/civicrm/mailing/view?reset=1&id=1 where the id in the query string is the ID of the mailing.
Note: In order for mailings to be accessible when not logged in to Drupal, you need to give the "view public CiviMail content" permission to anonymous users in Drupal.