back to phpList.org

Automate birthday emails

plugins
Tags: #<Tag:0x00007f74a0e25678>

#1

Hello,
I would like to know if there is a plugin or some function within phplist to send automated emails on subscribers’ birthdays.

Thank you


#2

Not that I’m aware of, however you could store the birthday in a standard format as a subscriber attribute, and then it should be simple for a plugin to compare the date to today.

The Segment plugin can almost do this – if it had the option to select “today” as a date (as a comparison value) then I believe it would work. @duncanc Thoughts?


#3

@samtuke @vomfelsen The Segment plugin could possibly be enhanced to select subscribers whose attribute value matches in some way the current date.
But there are some practical issues

The type of attribute.
If it is a date attribute then I suspect people might not be keen entering their date of birth. It could be a text field holding say just the day and month, but that would need to be in a standard format.

The campaign would need to be processed and re-queued each day, and you would probably want a new campaign for each year because once someone receives the campaign for this year’s birthday, phplist won’t send the campaign again for next year.


#4

@duncanc Good points


#5

Hi Duncan, I’ve modified your plugin here to do exactly this. I am using it to send a daily email to anybody who’s “date of birth” attribute matches my “is today” query, which just checks the month/day against today’s date.
It’s probably not a widely used feature, but our subscribers all have date of births so we can use this feature. If it’s of interest I can send over my modifications.


#6

@smiffsoft Yes, I’d like to see your changes to see whether they could be incorporated into the plugin.


#7

@duncanc I’ve copied the 5 files I changed to here : http://www.smiff.me/swp/

If you change a date option to “is today” then it’ll match if the month/day is the same as today. It’s not obvious it’s for matching birthdays against full Date Of Birth, but I guess that could be made more clear in any documentation if you incorporate it into your very useful plugin.


#8

@smiffsoft Something is going wrong when trying to access those files and the server is returning a 500 error. Can you just zip the complete modified plugin then put that in a private message to me?


#9

I’d be interested to see them too. It should be possible to attach files here, to regular forum posts.


#10

It won’t let me attach a file as I’m a new user, I’ll try and send it in a PM, if not I’ve added the zip to the link I sent up there ^^^


#11

Here’s the file mentioned.SegmentPluginBirthdayTweaks.zip (5.0 KB)


#12

@Dragonrider thanks for the file.

@smiffsoft At the weekend I had a go at adding “anniversary” functionality to the Segment plugin and, looking at your changes,had the same approach as you. I think that using the term “Anniversary” is more general than “Birthday”.
image

I will tidy-up my changes then release a new version of the plugin. That should work in the same way as your changes.

Also, I will fix a bug I noticed. For a date attribute the code to apply the “IS” operator was inadvertently removed last year, so it needs adding back in.


#13

@duncanc Looks good. Totally agree that Anniversary sounds better, and is more generic than “birthday”. This plugin has helped me work toward replacing a proprietary system we’ve been using for a few years now. Once I’ve sorted our mail server out with all the dkim setup we’ll be able to switch over completely.