I made a patch for enewsletter.module that implements a much-requested feature: previewing the newsletters before sending.
It adds two links below each newsletter's status in admin/enewsletters/newsletters: 'Plain text preview' and 'HTML preview'. Clicking on either of them will open a new browser window with the newsletter as it would be seen by a user who had checked all the allowed terms for that publication.
The patch is basically a replication of enewsletter_process_publications function, from which all references to a particular subscriber have been stripped. And, of course, the mail generation.
Remeber you must have created at least on new node in some of the categories that make the newsletter since the last time you sent it in order to see something.
This is the first time I submit a patch, so you're free to cick me in the ass if I did something wrong.
Robert, I hope you find it helpful...
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | enewsletter.module | 40.17 KB | nbayaman |
| enewsletter_preview.patch | 7.76 KB | solaas |
Comments
Comment #1
nbayaman commentedGood aproach. This is realy nececcary feature. But I have some troubles. I've applied the patch, links appeared, but they do nothing. The only open initial http://sitename/admin/enewsletters...
i attach the patched enewsletter.module
Comment #2
pfaoclePlease don't change the issue category from feature/bug to support if you are either having trouble applying the patch, or the patch is broken, no good or just not up to scratch generally. Rather, leave the category as is, mark as 'patch (code needs work)' and explain the problems.
Back on topic, this looks like a great feature for an already brilliant and promising (albeit unfinished) module. +1 from me, and I'm going to take time looking into this one tomorrow. Thumbs up, all.
Comment #3
robert castelo commentedSorry, haven't had time to look at this yet.
A preview facility is next on my list of features to implement.
There will be a preview on the template page, activated by a "preview" submit button.
Also, I'll have a "send email preview to:" field and "send preview" button, so we can see exactly what the message will look like.
Comment #4
robert castelo commentedThe approach in the patch above is also good.
I think previewing templates with dummy data would be useful.
Also previewing actual newsletters is also neccessary.
Comment #5
robert castelo commentedImplemented another approach, which is to send a preview email to users in a role.
Previewing in the browser was not that useful, the best place to preview is in email clients.