Hi there,

I'm mainly wondering if this is of any interest to you.. I was recently asked to create a newsletter that sends a personalized email to every user.. Sunmailer seems to provide a great basis for that already (as it's based on Views), but since there aren't really enough hooks to go around, I had to create my copy of the module and adjust some core functions.. Most important of all was that the user object had to be sent over to the view for every user and some minor corresponding fixes..

It would probably be interesting to the community and I already thought about a submodule, but somehow it just doesn't seem to be too nice as either I have to copy all the sunmailer code, which makes maintenance a hell.. or as in the version I have now, a line in the core sunmailer has to be edited if one wants to use my user-based module...

So the basic question is - would you be interested in implementing this in your module? If yes then I could send you the code or help maintain that part.. Or even better if we could agree on some more hooks and make the whole thing even better extendable in the future.

Let me know if you're interested in this in any way.

Thanks,
Martin

Comments

Mike Wacker’s picture

SunMailer 1.3 generates one newsletter for all users with the same choice for sections and formats. Emails are sent in bulk via bcc.

When released, SunMailer 1.4 still generates newsletters the same way, but it has the option to send individual emails.

SunMailer 1.5 could offer the option to generate one newsletter per user, and add some new hooks/modify existing ones to support modifications. Given the obvious performance/scalability issues, this would be disabled by default, though someone could opt to enable it.

arski’s picture

Hey, sounds great.

Do you have any sort of a timeline for 1.4-1.5 releases?

The scalability issues are indeed obvious for generating/sending emails on an individual basis, but it would be really great to have that option nevertheless. I've just finished implementing this functionality in my customization of sunmailer and I would be glad to share the bits of code. I don't have a special UI for this, so I guess that's the hardest part.. making the newsletter generate the views with a user argument is really just a couple lines of code..

Anyway, let me know if I can help.

Cheers,
Martin

Mike Wacker’s picture

I'm hoping to release 1.4 by the end of the week. No timeline on 1.5 yet, though.

One idea was to allow it with the usual exhortations about scalability and whatnot. SunMailer switches to an anonymous user and executes the view. My thoughts were we could switch to each user and execute the view for that user. One can design views so that they depend on who is logged in, if I recall correctly.

arski’s picture

Hey Mike,

That's exactly what I'm doing now. I'm going through the $addresses array which contains $uid->$mail pairs and for each $uid build that user instead of anonymous and pass it to a view that generates content based on the logged in user, just as you put it. In terms of code it's really not much.

Just let me know how I can help once you're done with 1.4.

Take care,
Martin

Mike Wacker’s picture

Status: Active » Needs review

Feature is checked into CVS, the dev branch should update within 8 hours.

Once the dev branch is ready, grab it and give it a test spin. There are 3 levels of customization you can choose from in PHPMailer settings. The last one is the one you want.

drupalok’s picture

hello again. i was the one asking for CONTENT PERMISSION integration
http://drupal.org/node/801208

i just tried the latest DEV release but i still dont see the fields that are CONTENT-PERMISSION-RESTRICTED in my mail though the user that gets the mail has the right access permissions.

is this integrated yet or not? what do i have to configure besides "Send a customized newsletter to each email address" ?

thank you very much for this nice module again... I'm just this tiny issue away from loving it :)

Mike Wacker’s picture

Are these Views fields then? For those, you need to create a copy of the XSL file and modify it so that it displays those fields. The fields should be appearing in the XML, but you need to modify the XSL to actually use those fields.

Mike Wacker’s picture

Status: Needs review » Fixed

It's part of the 6.x-1.6 release. FYI, I moved the option for personalized emails from PHPMailer settings into Newsletter content.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

guntherdevisch’s picture

Version: 6.x-1.3 » 6.x-2.0-beta1
Status: Closed (fixed) » Active

Hi,

Is sending personalized emails possible with the 6.x-2.x versions?

I'm very interested in this feature!

Thanks!

Greets,
Gunther

guntherdevisch’s picture

Anyone?

arski’s picture

Status: Active » Closed (fixed)

as you can see above, this was committed to the 1.x branch quite a while ago, so probably is a part of 2.x as well.. why don't you check the 2.x release yourself (I'm not the maintainer here, so I don't know for sure) and reopen this issue if it is actually the case that it's missing from 2.x

Mike Wacker’s picture

Version: 6.x-2.0-beta1 » 6.x-1.6

It was cut from the 6.x-2.x branch. I added sever major features in this branch, so to make room for everything I didn't migrate this feature over to the 6.x-2.x branch, both for the cost of the migration and the cost of future maintenance.

SunMailer was originally designed as a broadcast mechanism like most newsletters, not a mechanism for delivering content personalized based on each user's permissions. I moved SunMailer closer to its original philosophy - while a few may care about this feature, almost all newsletters will be utilizing your typical broadcast mechanism.