Skip to Content Skip to Menu

Auto action when user receives PM

  • liaskas
  • liaskas
  • ONLINE
  • Posts: 391
  • Thanks: 36
  • Karma: 2
  • Add-ons
1 year 10 months ago #332453 by liaskas
Auto action when user receives PM was created by liaskas
Hello

I know that the internal PM plugin can be set to send mail notifications to users that receive a PM. With this setting enabled, our system will send an e-mail to all of our registered users when they receive a PM.

Our site is used by aprox 7000 users per day that communicate by PM. You can understand that the volume of the sending mails because of received PMs is too high and this has caused our site to be blacklisted twice for spamming. This is why right now we have completely disabled the notification by mail on PMs.

But not sending mail notifications for PMs when a site is Business oriented is not the best practice! You need your users to be notified by mail so that they are always inside the website.

So we thought if there is a way to use an auto action that will send notification mails to users when they receive a PM if some conditions are met.

Example of conditions
Recipient mail is not gmail.com, yahoo.com or hotmail.com

We want to send mail notifications (at first) only to companies that are registered with their company domain e-mail (xxx@theirdomain.com)

Can this be done with an auto action and how?

Thank you in advance.
 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 10 months ago #332465 by krileon
Replied by krileon on topic Auto action when user receives PM
Yes that's doable. You can send your custom email notification on the pm_onAfterCreateMessage trigger. Directly after that is actually where the PMS has its notification handling.

None of our notifications except CBSubs Mailer are designed for high volume like that (thousands per day). My recommendation is probably to offload the emailing to a 3rd party messaging service or consider using an external mail server with high ratings (e.g. Amazon SES).


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.

  • liaskas
  • liaskas
  • ONLINE
  • Posts: 391
  • Thanks: 36
  • Karma: 2
  • Add-ons
1 year 10 months ago #332469 by liaskas
Replied by liaskas on topic Auto action when user receives PM
Than you for your reply Krileon.

I have created the auto action and it is sending the mails fine, but it does not seem to respect one of my auto action conditions...
I do not want mails to be sent to users registered with gmail.com and hotmail.com mails.

So i set this condition in my auto action...

Field: Value
Custom value:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 10 months ago #332477 by krileon
Replied by krileon on topic Auto action when user receives PM
Contains operators apply their delimiter to the field not to the value as explained the delimiter parameter description. Delimiter usages work by exploding by the delimiter then checking if a value is in the resulting array. For your usage you should be using a REGEXP operator and write the necessary REGEXP to exclude those domains since you're needing to match against more than 1. The alternative is use multiple contains conditions via OR conditions and leave delimiter empty so it just does a string search.


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.

  • liaskas
  • liaskas
  • ONLINE
  • Posts: 391
  • Thanks: 36
  • Karma: 2
  • Add-ons
1 year 10 months ago #332503 by liaskas
Replied by liaskas on topic Auto action when user receives PM

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 1435
Hello Krileon
Tried both ways...
1. use multiple contains conditions via OR conditions

Auto action conditions
Field: Value
Custom Value: [cb_notif_pm]
Operator: Not equal to
Value: 0

AND

Field: Value
Custom:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 10 months ago #332507 by krileon
Replied by krileon on topic Auto action when user receives PM
The below should work fine

Field: Custom > Value
Custom Value:


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