Announcement

Collapse
No announcement yet.

Can't send emails after upgrade to 7.2.3

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't send emails after upgrade to 7.2.3

    Hi

    Yesterday I updated our EspoCRM from 7.1.10 to 7.2.3.

    Today I have one user who is unable to send emails from EspoCRM. He gets the following error message:
    Click image for larger version  Name:	EspoCRM.png Views:	0 Size:	4.2 KB ID:	83059
    Error 403: Access denied
    Assignment failure: assigned user or team not allowed.
    Yesterday (before the update) he could send emails without any problem.

    Logfile is also not very helpful:
    ERROR: (403) Assignment failure: assigned user or team not allowed.; POST /Email; line: 418, file: ROOT_FOLDER\application\Espo\Core\Record\Service.p hp [] []
    In the browser console I get the following errors:
    Click image for larger version  Name:	Console.png Views:	0 Size:	18.1 KB ID:	83062

    I think it might be related to the changes for the custumizability of the emails (layout, fields, etc.). But I don't even quite get, what this error message means. yuri Maybe you can clarify what this error message means?

  • #2
    For anyone having the same problem:
    What did the trick for me, was adding a default team to the user, then it worked. And after I remove the default team, it still worked :-)

    But this seems like a bug, doesn't it?

    Comment


    • #3
      I could not reproduce. Tried to send an from a regular user w/o a Default Team.

      Comment


      • #4
        Could be that the user had a default team that is not their team.

        Comment


        • #5
          No, the user had no default team at all.
          I then tried adding a default team and it worked again.
          I then tried removing the default team and it still worked.

          Comment


          • #6
            Today I had the same thing again...

            The user wanted to send an email and it did not work. Then I added a default team to the user and it worked again.

            But there is one thing I need to correct: If I remove the default team it still seems to work for some time. But If I remove the default team and clear the browser cache on the client it instantly does not work anymore.

            So if the user has a default team it works, and if not, it does not work. Is this field mandatory all of the sudden yuri ?

            Comment


            • #7
              I am having the same issue. yuri - The "Email" scope is returning as False in Espo\Core\AclManager\checkScope. I can't send test emails, the "Send Email Invitations" button is missing from Meetings, and reports can no longer be sent via email from the Reports tab. Cron emails are still working. I do not know when this started happening, but I first noticed it yesterday. I am using 7.2.4 and I know it was working in 7.1.x.

              PHP Code:
                 public function postActionSendTestEmail(Request $request): bool
                  
              {
                      
              $GLOBALS["log"]->debug("",[$this->acl->checkScope(EmailEntity::ENTITY_TYPE)]);
                      if (!
              $this->acl->checkScope(EmailEntity::ENTITY_TYPE)) {
                          throw new 
              Forbidden();
                      }
              ​ 
              Code:
              [2022-09-23 09:36:24] DEBUG:  [false] []
              [2022-09-23 09:36:24] DEBUG: API (403) POST /Email/action/sendTestEmail; Input data: {...}; Route pattern: /{controller}/action/{action}; Route params: Array (     [controller] => Email     [action] => sendTestEmail )  [] []
              [2022-09-23 09:36:24] ERROR: (403) POST /Email/action/sendTestEmail; line: 79, file: /var/www/crm/application/Espo/Controllers/Email.php [] []​
              I am logged in as an administrator. Something is definitely wrong, but I can't figure out where the permissions are stored in the database to know for sure where the problem originates.
              Last edited by bandtank; 09-23-2022, 09:40 AM.

              Comment


              • #8
                Originally posted by bandtank View Post
                I am having the same issue. yuri - The "Email" scope is returning as False in Espo\Core\AclManager\checkScope. I can't send test emails, the "Send Email Invitations" button is missing from Meetings, and reports can no longer be sent via email from the Reports tab. Cron emails are still working. I do not know when this started happening, but I first noticed it yesterday. I am using 7.2.4 and I know it was working in 7.1.x.

                PHP Code:
                public function postActionSendTestEmail(Request $request): bool
                {
                $GLOBALS["log"]->debug("",[$this->acl->checkScope(EmailEntity::ENTITY_TYPE)]);
                if (!
                $this->acl->checkScope(EmailEntity::ENTITY_TYPE)) {
                throw new 
                Forbidden();
                }
                ​ 
                Code:
                [2022-09-23 09:36:24] DEBUG: [false] []
                [2022-09-23 09:36:24] DEBUG: API (403) POST /Email/action/sendTestEmail; Input data: {...}; Route pattern: /{controller}/action/{action}; Route params: Array ( [controller] => Email [action] => sendTestEmail ) [] []
                [2022-09-23 09:36:24] ERROR: (403) POST /Email/action/sendTestEmail; line: 79, file: /var/www/crm/application/Espo/Controllers/Email.php [] []​
                I am logged in as an administrator. Something is definitely wrong, but I can't figure out where the permissions are stored in the database to know for sure where the problem originates.
                FYI - My particular issue was fixed by enabling the Email entity. I'm still confused why this started happening recently because the Email entity has been disabled for a long time, but I'm happy it is resolved.

                Comment


                • #9
                  Originally posted by bandtank View Post
                  FYI - My particular issue was fixed by enabling the Email entity. ...
                  What do you mean by "enabling"? Do you mean under "Administration" > "Entity manager" > "Email" > "Edit", and there uncheck the checkbox "Disabled"?
                  The checkbox has been enabled at our instance.

                  Comment


                  • #10
                    Originally posted by lucakuehne View Post

                    What do you mean by "enabling"? Do you mean under "Administration" > "Entity manager" > "Email" > "Edit", and there uncheck the checkbox "Disabled"?
                    The checkbox has been enabled at our instance.
                    Yes, that is what I mean. Do you have the permission set correctly?

                    Comment

                    Working...
                    X