Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

timed cb_mailer email work-around?

  • tgribble
  • tgribble
  • OFFLINE
  • Posts: 71
  • Thanks: 0
  • Karma: 1
11 years 8 months ago #221792 by tgribble
timed cb_mailer email work-around? was created by tgribble
hello

ver:
J2.5.9
cb1.9
cb_sub 3.0.0


im trying to get the cb_mailer in cb_subs to send an email based on a cb field date.

since the mailer only send emails based on cb dates relative to the subscription plans, i was hoping to achieve a method by doing thus:

since the subscription is for 1 year, i thought to make the emails go out after subscription and monthly thereafter, month1 , month2 etc. when the date is triggered, the mailer checks to see if the user's cb_licenceexpiry is "1" and if so send them the email.

in the "conditions" tab, i made a query field to check of the cb_licenceexpiry field is within 30 days from today with:
Code:
SELECT IF(DATEDIFF( `cb_licenceexpiry`, NOW() ) < 31 , IF(DATEDIFF( `cb_licenceexpiry`, NOW() ) >= 0 , 1, 0), 0) FROM `#__comprofiler` WHERE `id` = '[user_id]'

with a comparison of :



the problem is it send multiple emails for each active mailer, with members getting email after email



i cant seem to figure out how to make it so that as the user has been reminded once, the mailer does not fire again?

any suggestions?

thanks
Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221817 by krileon
Replied by krileon on topic timed cb_mailer email work-around?
You'd need something for the user to flag themselves as already reminded. I'm not sure why you need all of this however. I suggest the below as it seams more appropriate to your needs instead of having 12 different reminders.

Automatically send message at following date: 1 month before
Relative to this date of the plans below: Subscriptions expiration date
To which plans this date condtion applies: Your yearly plan
Must be in state: Active

This would remind them 1 month before they expire. Suppose am just confused as to why you have 12 reminders. Do you intend on reminding them every month of the year? Isn't it a yearly subscription? What is the purpose of the license expired field?


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • tgribble
  • tgribble
  • OFFLINE
  • Posts: 71
  • Thanks: 0
  • Karma: 1
11 years 8 months ago #221825 by tgribble
Replied by tgribble on topic timed cb_mailer email work-around?
hi krileon,

thanks for the reply

the licence can expire anytime in the year, the monthly email looks ahead 30 days to see if the expiry is from the time email ( month 1 , month 2 etc ) and if the licence is expiring in the next 30 days send them and email.

this could be avoided if there was a way to generate an email on a cb_field date rather than a relative to subscription method??

i hoe that helps to understand the problem?

any more help please??

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221827 by krileon
Replied by krileon on topic timed cb_mailer email work-around?
Is your license a yearly subscription though? So expiration date would be accurate, correct? In which case having a trigger of 30 days before expiration would be completely accurate. Doesn't matter what their exact expiration date is as it'd always calculate the trigger has 30 days before that time. It's completely dynamic.

this could be avoided if there was a way to generate an email on a cb_field date rather than a relative to subscription method??

You can conditional off a date field, but you can't have a CB date field be the trigger. It's CBSubs Mailer and not CB Mailer so it is designed with CBSubs usage in mind.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • tgribble
  • tgribble
  • OFFLINE
  • Posts: 71
  • Thanks: 0
  • Karma: 1
11 years 8 months ago #221832 by tgribble
Replied by tgribble on topic timed cb_mailer email work-around?
hi there.
cb_licenceexpiry is the members pilot licence. it is independent of the subscription. the suscription is to the club, the cb_licence expiry refers to their own flying licence. i am trying to send them an email to advise them that their licence is due to expire soon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221845 by krileon
Replied by krileon on topic timed cb_mailer email work-around?
CBSubs Mailer probably isn't the best solution for this then as it has no mailer triggers for custom fields and only triggers on specific dates that it supports. You'll probably want to use a Newsletter extension that lets you send to users based off the results of a query. There are a few that can do this found below.

extensions.joomla.org/extensions/content-sharing/newsletter


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum