I'm currently trying to get SimpleNews to jump thru a hoop a customer would like to create ;)

They thought it would be a nice 'touch' to the mailinglist, to have each email that is sent out, to have a personal hello added to the top.

Which looked like a not to hefty change to the module at first, until I found out that the node that is sent out, is created once during each cron-session.
My question is, it is feasable to alter the flow of the send-process to have SimpleNews create the temporary-node once during each run, and have it search and replace the fields I would like, before actually sending the email?

I'm gonna have a go at hacking into the process in the next couple of days, but my drupal-hacking skill have gone a little rusty..
That's what you get for not tinkering with Drupal for 6 months, and then recommending it as a framework to you new employer ;)

Comments

Alex Regenbogen’s picture

Status: Active » Closed (fixed)

I've made a little temporary solution for myself, by moving the $user_node = drupal_clone($node); to a lower place, within the mail-loop.

This, and the helper-function I created that takes care of replacing the fields that we're inserted in the node, made it possible.

I know that this is not the most elegant sollution, and quite possibly a big performance hit during the cron-triggers... but hey.. ;)
If someone else is interrested in this 'work-around', please let me know, so I can tidy up the code, and post :)

sleepingmonk’s picture

If this will allow the email to be personalized with the recipients name, etc. YES, I would love a description of your work around and a look at the code.

Thanks!