Automate birthday emails

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

1 Like

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?

@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.

@duncanc Good points

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.

1 Like

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

@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.

@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?

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

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 ^^^

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

@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.

@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.