Request - Birthday Reminder Email

alt=
joeblack_2k2
@joeblack-2k2
7 years ago
1 posts
Dear all,

as of using genosis up-to-now I really like the easy gui.
Since I didnt find any feature, to send out email reminders for the upcoming birthday events, could someone point me in the right direction on how I could code this in a easy way myself ?

Thanks in adavnce,

Martin
updated by @joeblack-2k2: 10/29/17 05:04:28PM
michael
@michael
7 years ago
7,744 posts
Welcome to the forums Martin. :)

Feels like the post is a cross between a Feature request / suggestion and a coding question.

You're right that currently there is not a module that sends out (to who?) an email reminder for upcoming birthday events.

How to code it: You'll need to build a module to do this. There is no easy vs hard way to build a module, its just language. If you haven't worked with code before im not sure where to point you to.

Code is a language just like english is, you make sentences to give instructions.

We do build sponsored modules for the community if you wanted to sponsor it:

Docs: "Sponsor a Module"
https://www.jamroom.net/the-jamroom-network/documentation/jamroomnet/4931/sponsor-a-module

If you do know php and would like to build a module for this, then the way I would go about it would be:
#1 ) create a new module structure

Docs: "Creating a Module"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/26/creating-a-module

#2 ) Use the "Events and Listeners" system to fire off a function on either the 'daily_maintenance' or the 'hourly_maintenance' events that would do a search for the coming birthdays, then send an email.

Docs: "Events and Listenser"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1011/events-and-listeners
Melih
Melih
@melih
7 years ago
198 posts
Hello Martin,

I wanted to do the same thing but i learnd there is no easy way to do this. So i made it myself. I made weekly email notofication for upcomeing anniversaries and a list of them for my main page. So, to do this you need a list of events. Unfortunately, jrGenEvents does not have a easy way to make a list for birthdays or other anniversaries because of time coding. Actually you can list them but you cannot say easly "show me is there any anniversary for tomorrow"...

It's not easy but it's possible. Now, i can see a list of certain events of the next 30 days on main page. And system sends email every sunday for the week's anniversaries automatically.

My English is terrible but maybe you find a hint to make it your way.

I have a custom module to find events for the next 7 days. for example, for monday
$monday= date("md", strtotime("+1 day"));

with a jrCore_db_search_items function, you can search "event_date like %$monday"

After that you will need a tamplate for email. Than pass the results to your email template of that seach.

In brief, create a function to search events for specific days > shape them with an email template > send them to your users.

Essential point is, jrGenEvents' time coding like 20170731 for July 31th 2017 but you need the last part 0731. That's becayse i use date function with "md". So you need to seach events like; month is 07 and day is 31. This is the tricky part. When you overcome this you can made other stuff.

PS: Be aware of the privacy settings of Jamroom Core and Genosis Core and User. Those settings can cause your functions fails or your emails sends empty ;)
updated by @melih: 07/31/17 01:14:40PM

Tags