From a1af93f9a84969a9788d2e7a066d30b5ad843057 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Tue, 23 Jul 2024 12:50:44 -0400 Subject: [PATCH] family invite emsil --- .../FAMILY/family_relative_invite.mailfile | 183 ++++++++++++++++++ wrenchboard/src/shared_tool/email.cc | 10 +- wrenchboard/src/shared_tool/family_acc.cc | 1 + 3 files changed, 193 insertions(+), 1 deletion(-) create mode 100644 wrenchboard/email/FAMILY/family_relative_invite.mailfile diff --git a/wrenchboard/email/FAMILY/family_relative_invite.mailfile b/wrenchboard/email/FAMILY/family_relative_invite.mailfile new file mode 100644 index 00000000..68e3927b --- /dev/null +++ b/wrenchboard/email/FAMILY/family_relative_invite.mailfile @@ -0,0 +1,183 @@ +Subject: {{subject}} + + + + + + +{{subject}} + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+WrenchBoard +
+{{site_trade_name}} +
+
+ + + + + + + + + + + + +
+Dear {{firstname}}, +
+IT_WILL_NICE_TO_SAY_WHO +
+ +
+
+ + + + + +
+ + + + + + + + + + +
+ I am excited to invite you to join our family platform on WrenchBoard. + +
+
+ WrenchBoard offers a unique space for our family to stay connected, share updates, and manage important tasks together. By joining, you'll have access to our shared calendar, photo albums, and group messages. + +
+ To join, please click on the link below and follow the instructions to set up your account: + +
+[Invitation Link] + +
+
+ + + +
+Please contact us at https://www.wrenchboard.com/contact if you have any question about this email. +
+{{site_name}} Team +
+{{server_name}} +
+ +
+ + + \ No newline at end of file diff --git a/wrenchboard/src/shared_tool/email.cc b/wrenchboard/src/shared_tool/email.cc index 040534c2..e1a9caeb 100644 --- a/wrenchboard/src/shared_tool/email.cc +++ b/wrenchboard/src/shared_tool/email.cc @@ -421,12 +421,20 @@ long family_email(long mailtype, CVars in, CVars &out) { " LEFT JOIN members_family f ON f.family_member_id = s.member_id " " LEFT JOIN members m ON m.id=f.member_id WHERE s.id = %lu", in["suggest_id"].Long())) { vars2form(x, form); - form.LetStr("subject", "You have received a task suggestion from"); + form.LetStr("subject", "You have received a task suggestion from"); form.LetStr("email", x["parent_email"].c_str()); form.Email("FAMILY/family_suggest_task.mailfile"); } break; + case WRENCHBOARD_RELATIVES_REMINDER: + load_db_record(x, "SELECT * FROM members_family_relative WHERE id = %lu ",out["relative_id"].Long()); + vars2form(x, form); + form.LetStr("subject", "Invitation to Join Our Family Platform on WrenchBoard"); + form.LetStr("email", x["email"].c_str()); + form.Email("FAMILY/family_relative_invite.mailfile"); + break; + } } catch (bad_parameter) { diff --git a/wrenchboard/src/shared_tool/family_acc.cc b/wrenchboard/src/shared_tool/family_acc.cc index 5b384c42..5e17734e 100644 --- a/wrenchboard/src/shared_tool/family_acc.cc +++ b/wrenchboard/src/shared_tool/family_acc.cc @@ -156,6 +156,7 @@ long WrenchRelativesReminder(CVars in, CVars &out){ { load_db_record(out, "SELECT id AS relative_id, uid AS relative_uid FROM members_family_relative WHERE member_id = %lu AND uid::text ='%s' ",out["member_id"].Long(), in["relative_uid"].c_str()); + family_email(WRENCHBOARD_RELATIVES_REMINDER, out, out); ret = PHP_API_OK; out["status"] = "OK";