Email to all connected user on new Blog

4 years 2 weeks ago - 4 years 2 weeks ago #317446 by nancy.aharpour
Email to all connected user on new Blog was created by nancy.aharpour
Hi,
I would like that every time there is a new blog, an email is sent to all the connected users that in their profile they have chosen to receive the notification email

Is this possible?

each user has in their profile the single checkbox named [cb_notif_blog_email]


I did this but doesn't work, the system sends an email to all connected users despite [cb_notif_blog_email] setting

CB Blog Type = Joomla

CB Auto Action -->

Type => EMAIL

Trigger => cbblogs_onAfterCreateBlog

Condition =>

Field = Value
Custom Value = [var3_cb_notif_blog_email] NOT EQUAL 0

Action =>

To = [action_user]
Subject = [var3_username] has written a new blog
Body = Hi,
your friend <B>[var3_username]</B> has written a new Blog: "[var2_title]"

thanks

Nancy

Please Log in to join the conversation.

4 years 2 weeks ago #317458 by krileon
Replied by krileon on topic Email to all connected user on new Blog
I don't recommend really doing this. It's going to produce a lot of outbound emails from your domain, which if Google doesn't know you well they will blacklist you and your emails will always go to spam. We've had a huge headache dealing with Google (and that was just in regards to weekly newletters and registration emails!) so everyone should consider how often they really actually need to be sending emails. With that said the below should work.

Global
Triggers: cbblogs_onAfterCreateBlog
Type: Email
User: Connections
Access: Everybody
Conditions
1: Custom > Value: [var1_published] Equal To 1
Action
To: [user_id]
Subject: [cb:userdata field="username" user="[action_user]" /] has written a new blog
Body:
Hi,
your friend <B>[cb:userdata field="username" user="[action_user]" /]</B> has written a new Blog: "[var1_title]"


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.
The following user(s) said Thank You: nancy.aharpour

Please Log in to join the conversation.

4 years 2 weeks ago - 4 years 2 weeks ago #317467 by nancy.aharpour
Replied by nancy.aharpour on topic Email to all connected user on new Blog
Thanks a lot,
just a thing.

I want that the email is sent to all connected user (received user) that in their profile have set the single checkbox named cb_notif_blog_email = Yes

this means that if all the connected user has set their cb_notif_blog_email = No

No email at all is send

Did I explain my self? Sometimes is not so easy in English for me :-)

Thanks
Nancy

Please Log in to join the conversation.

4 years 2 weeks ago #317472 by krileon
Replied by krileon on topic Email to all connected user on new Blog
The above should work fine for that. Add whatever conditions you'd like. Example as follows.

1: Custom > Value: [var1_published] Equal To 1
2: FIELD_NAME Equal To 1

I assume the field is a checkbox field so you'd simply select it where FIELD_NAME is and make sure its value is 1 (checked/Yes). The first condition is to be sure you're not notifying people of an unpublished blog entry.


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.
The following user(s) said Thank You: nancy.aharpour

Please Log in to join the conversation.

4 years 2 weeks ago #317480 by nancy.aharpour
Replied by nancy.aharpour on topic Email to all connected user on new Blog
Works perfectly thanks

Please Log in to join the conversation.

4 years 2 weeks ago #317483 by nancy.aharpour
Replied by nancy.aharpour on topic Email to all connected user on new Blog
My last question

is it possible to send in the email the link to the blog so the users can click on it from the email they received?

thanks

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.479 seconds

Facebook Twitter LinkedIn