Does anyone know if the simplenews.module REcreates each email before it sends to each subscriber or not? It appears to do this.
Our newsletter takes hours to send and is sent out with a ridiculously long node "Title" (which is used as the email's subject line). During the cron-run part of the delivery of our last issue, I changed the node's title to a shorter one that would not overflow out of the SimpleNews subscription/previous-issues block and the subject line of the emails being sent out changed accordingly as the issue was being delivered.
Alone, this behaviour poses a possibility of easy screw-ups for unwitting and/or non-admin users. But if it also means the email is being re-generated for each subscriber, it would seem like an unnecessary and potentially dangerous drain on server resources. Why couldn't the email be generated once and re-sent to all subscribers after the first one?
Am I misunderstanding this or is this what is actually happening? If it is, can anyone suggest a way I could quickly modify the simple.module or related code to have the mail generated only once?
Comments
Comment #1
DriesK commentedThe e-mail is created once (based on the node table) during each cron run. Between cron runs, the e-mail is not separately stored. This was discussed on the development mailing list a few weeks ago, and it was decided that storing the mail in between cron runs wasn't necessary.
So as an answer to your question: "Why couldn't the email be generated once and re-sent to all subscribers after the first one?": this is the way is works, during one cron run (see simplenews.module line 926). What you observed was probably the result of a subsequent cron run.
Comment #2
ADMarshall commentedThat's OK. Thanks for the explanation.
Comment #3
sutharsan commented