Portal users not being notified by email about posts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rodrigocoelho
    Active Community Member
    • Jun 2016
    • 296

    Portal users not being notified by email about posts

    The users can see the posts, can post, the configuration tells to notify by email the portal users about posts, but nothing happens.
    But when the user posts in the portal, a normal user receives the notification by email, as expected.

    yuri​​​
  • victor
    Active Community Member
    • Aug 2022
    • 727

    #2
    Hi rodrigocoelho,

    Email Notification for Users work when this User is not online. When the user is logged in and online, he receives a simple notification (the bell in the upper right corner).
    Last edited by victor; 10-07-2022, 08:57 AM.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      If a user managed to read an in-app notification before an email is sent, the email will be bypassed. There a configurable delay for email notifications (plus cron processing time).
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • rodrigocoelho
        Active Community Member
        • Jun 2016
        • 296

        #4
        Originally posted by yuri
        If a user managed to read an in-app notification before an email is sent, the email will be bypassed. There a configurable delay for email notifications (plus cron processing time).
        The delay is configured as 0.
        The user (portal user) is not logged in. Something weird. Did you get it reproduced?

        Comment

        • yuri
          Member
          • Mar 2014
          • 8440

          #5
          We have this feature working in our customer portal.
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          • lazovic
            Super Moderator
            • Jan 2022
            • 809

            #6
            Hi rodrigocoelho,

            Can't reproduce your issue, all email notifications are sent properly.

            Please go to Administration > Scheduled Jobs, click on the Jobs button in the upper right corner and search for Send Email Notifications. Are there records with Failed status?

            Comment

            • rodrigocoelho
              Active Community Member
              • Jun 2016
              • 296

              #7
              Originally posted by lazovic
              Hi rodrigocoelho,

              Can't reproduce your issue, all email notifications are sent properly.

              Please go to Administration > Scheduled Jobs, click on the Jobs button in the upper right corner and search for Send Email Notifications. Are there records with Failed status?
              They are being sent. Only the portal users don't receive...

              Take a look below..

              Click image for larger version

Name:	image.png
Views:	176
Size:	9.6 KB
ID:	83862

              Click image for larger version

Name:	image.png
Views:	192
Size:	47.9 KB
ID:	83861

              Comment

              • rodrigocoelho
                Active Community Member
                • Jun 2016
                • 296

                #8
                FORGET it, just tried AGAIN and it worked.

                Sorry folks.

                Please forget this post. Thank you for your time...
                Click image for larger version

Name:	image.png
Views:	189
Size:	36.4 KB
ID:	83864

                Comment

                • Mark
                  Senior Member
                  • Dec 2019
                  • 143

                  #9
                  maybe someone knows whether it's possible to send email notifications about new stream posts in a record for the associated contact, without creating a portal user for that contact? We were thinking maybe it would be possible to do it through a workflow, when a post record is created and certain conditions are met, unfortunately, we could not figure it out. But maybe there are some other ways or even a built-in functionality that does this?

                  Comment

                  • lazovic
                    Super Moderator
                    • Jan 2022
                    • 809

                    #10
                    Hi Mark,

                    There is no such built-in possibility, but it is quite possible to arrange it with the help of Workflow:

                    Target Entity: Note​
                    Trigger Type: After record created

                    Action: Execute Formula Script​
                    Code:
                    $parentId = workflow\targetEntity\attribute('parentId');
                    $parentType = workflow\targetEntity\attribute('parentType');
                    $parentName = workflow\targetEntity\attribute('parentName');
                    
                    $noteType = workflow\targetEntity\attribute('type');
                    $createdByName = workflow\targetEntity\attribute('createdBy.name');
                    $post = workflow\targetEntity\attribute('post');
                    
                    $postUrl = string\concatenate('[your-instance-url]/#', $parentType, '/view/', $parentId);
                    
                    $contactId = record\attribute($parentType, $parentId, 'contactId');
                    $contactEmailAddress = record\attribute('Contact', $contactId, 'emailAddress');
                    
                    $emailSubject = string\concatenate('Post: ', $parentType, ' ', $parentName);
                    
                    $emailBody = string\concatenate(
                    $createdByName, ' posted on ', $parentType, ' ', $parentName, '.', '\n',
                    '\n',
                    $post, '\n',
                    '\n',
                    'View: ', $postUrl
                    );
                    
                    ifThen(
                    $contactId != null && $contactEmailAddress != null && $noteType != 'Create',
                    $emailId = record\create(
                    'Email',
                    'to', $contactEmailAddress,
                    'status', 'Sending',
                    'subject', $emailSubject,
                    'body', $emailBody,
                    'isHtml', false)
                    );
                    
                    ifThen(
                    $contactId != null && $contactEmailAddress != null && $noteType != 'Create',
                    ext\email\send($emailId)
                    );​

                    Comment

                    Working...