Issue with sending emails & sync

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MatLudlam
    Senior Member
    • Aug 2016
    • 288

    Issue with sending emails & sync

    Hi I send a lot of emails from ESPO.

    When I go to my user settings and then pick "Email Accounts" from the top right I have set up the external server.

    I used to use an external hosted Exchange system, and things worked well. I could send emails and copies would be placed in the location that I asked for. It would also import them as required too.

    I now have a new mail server on Office 365 so have disabled the original connection, and set up a new one. ESPO sends and imports perfectly but there are issues with the copies of sent items.

    I have the system set so that when it sends an email, it adds a copy to a folder called "Sent Items / From CRM". This works.

    The issue is that it also adds a copy to the "Sent Items" folder too. I also have some workflows that send emails and I have them tagged as "Do not store sent email". This used to work, but they too are being put into the "Sent Items" folder.

    So in summary everything is working with the correct items being put into "Sent Items / From CRM". I am just getting extra items places into "Sent Items".

    Help appreciated.

    Thanks.
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Are you talking about Sent Items on the email server side? So, in fact, it creates 2 identical emails in the Sent Items? Is that correct?

    > I have the system set so that when it sends an email, it adds a copy to a folder called "Sent Items / From CRM"

    Comment

    • MatLudlam
      Senior Member
      • Aug 2016
      • 288

      #3
      Hi thanks for replying.

      Here is the configuration that I am talking about:
      Click image for larger version

Name:	Mail Config.png
Views:	452
Size:	49.5 KB
ID:	65256

      Everything that should be stored in Sent Items/From CRM is being stored there. That bit is correct.

      The bit that isn't working is that I am also getting identical items in the Sent Items folder (not the sub-folder). I am also getting emails into Sent Items from a workflow where I have said I don't want copies.

      Thanks.
      Attached Files

      Comment

      • MatLudlam
        Senior Member
        • Aug 2016
        • 288

        #4
        I am wondering if there is somewhere else in the product that is creating these extra copies?

        On that above screen I have the account set up in both the IMAP and SMTP settings. I don't know if I need both.

        Comment

        • esforim
          Active Community Member
          • Jan 2020
          • 2205

          #5
          Not sure if I can answer your first question but I think I can answer this one.

          "On that above screen I have the account set up in both the IMAP and SMTP settings. I don't know if I need both."

          IMAP = get your email
          SMTP = able to send out email.

          You could give the "Put in Folder" option a try.

          Comment

          • stepstep
            Junior Member
            • Apr 2025
            • 8

            #6
            I'm having a similar problem:
            I've created 1 group email account and 2 group email folders: "Test-Inbox" and "Test-Sent", which are being filled from corresponding imap folders by filters. That part works well.
            Connection wise, both IMAP and SMTP work fine.

            Problem begins when i open any of those custom folders (normally, it would be "Test-Inbox", cause you get emails from people there) and try to reply from there using Espo built-in client. For some reason it always automatically creates a copy of outbound email in whatever folder you decide to create reply from.
            Which, i can't do anything about - i've tried disabling "store copy on imap" feature, and all kinds of settings and group box/folder configurations, and the result is always the same --
            whenever i'm using builtin Espo email reply (doesn't happen with external client), i get an unwanted copy of sent email in folder, which was supposed to only store incoming emails.

            and if i go to another folder, ie "Test-Sent" folder, then it will create a copy there, so it seems it just picks whatever folder you're replying from, and creates a copy there.
            List View would show that email line as "To: xxxxx" in the Person String Data field, along with all inbound emails, it can also be found in default "Sent" folder.

            Is this intended behaviour?
            is there any way to disable it, so it doesn't mix inbox and outbox?
            I'd expect it to just send email, send a copy to imap, and only fill outbox "Test-Sent" folder once it syncs again.
            Thanks.

            Comment


            • yuri
              yuri commented
              Editing a comment
              Maybe it happens on the IMAP server level.
          • stepstep
            Junior Member
            • Apr 2025
            • 8

            #7
            yuri it doesn't look like IMAP issue because everything is fine on IMAP server -- this extra message doesn't exist there.
            when i send email from espo, it creates (additionally to normally working imap 'sent' copy), an extra email in that espo group folder, locally, which doesn't exist on IMAP.

            *ok there is an update to this:
            It only happens when i open a group folder, and then open some email and REPLY to it.
            it does NOT happen when you just "Compose" new message from scratch, even while having this group folder open -- when i do it, it works as planned - imap copy sent to server then synced back to group folder, no extra stuff.

            Comment


            • yuri
              yuri commented
              Editing a comment
              I'm not sure I understand your problem.

              It seems to me that your problem is not related to this topic. This topic was about IMAP folders. Espo folders have nothing to do with IMAP folders. They are completely different. Espo does not work like a regular email client. It's a hub of emails from different users and different email accounts.
          • stepstep
            Junior Member
            • Apr 2025
            • 8

            #8
            yuri my problem is the following:
            when i Reply to an email from a group folder, it puts my reply right away in that very same group folder for no apparent reason, instead of just sending copy to IMAP server and doing nothing.
            i am not sure whether this is intened, especially considering it doesn't work the same way between Reply/Compose.

            if i've read correnctly, the guy from original post also has similar issue: his imap "sent" sync works fine, but there's an extra copy in his Sent folder.

            Comment


            • yuri
              yuri commented
              Editing a comment
              Group folders in Espo is the way to share emails between team members. Replied emails stay in the same group folder by design. It's not related to IMAP.

            • yuri
              yuri commented
              Editing a comment
              The replied email stays in the same group folder. But the sender does not see the email they sent when they open the group folder. Other users see it there though. When the sender opens the sent email, they will see that it's related to the group folder (in the right panel). But the email is accessible only from the Sent folder (by design). Note that the Sent folder has nothing to do with the IMAP Sent folder as well.
          • stepstep
            Junior Member
            • Apr 2025
            • 8

            #9
            yuri ahhh then that explains it... okay, it kind of demolishes my plan to recreate imap structure by using group folders and filters, so i will either stick to "one group folder <-> all imap folders" concept (the only way to keep it consistent), or think of something else.. thanks for clarifying this behaviour.


            >>But the sender does not see the email they sent when they open the group folder.
            Though in my case sender does indeed see the exact email he just replied with, in both local "Sent" and Group folder, and this sender is not admin. maybe its something with Roles, idk.

            Comment

            • macistda
              Member
              • Jul 2022
              • 91

              #10
              If you send E-Mail from an Espo Group Account via a SharedMailbox from O365 the E-Mail is stored in the O365 UserMailbox from from which UserMailbox the SharedMailbox was accessed.
              Result:
              - Espo E-Mail is at the right Place (SharedMailbox) sent Items
              - Outlook E-Mail is at the wrong Place (UserMailbox) sent Items

              - That's because of licence and technical reasons at O365.
              - You are able to save an "additional copy" (Setting via O365Admin Panel) in the SharedMailbox (Outlook) but it's additional to the UserMailbox sent items. So that results in having double data.

              - For Outlook itself there is a Registry Setting to handle different (reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\1 6.0\ Outlook\Preferences" /v DelegateSentItemsStyle /d 1 /t REG_DWORD /f) not to get "double data", but that works for Outlook Desktop-Client only.
              - But that does not count for an "external Mailer" like EspoCRM.
              - Outlook via Web also is different in behaviour.

              We programmed for EspoCRM a Python Script which uses the Espo job management (runs every 10 Minutes) to move all E-Mail from "wrong" UserMailbox to "SharedMailbox". Uses API Connection to O365 with Oauth2.

              Comment

              • arturkulik
                Junior Member
                • Apr 2025
                • 13

                #11
                Hi Guys,
                I'm using espo 8.4.2

                I was trying to integrate with external email sending service with problems like: attachements were converted to base64? and was attached as text files,
                service provider says

                Most likely, the issue is that the CRM uses incorrect encoding from RFC 2047 (regardless of whether diacritical characters are present or not) instead of the correct one defined in RFC 2231. RFC 2047 cannot be used because, according to the specification..


                Can You help me telling where i can chage RFC coding?

                Comment


                • yuri
                  yuri commented
                  Editing a comment
                  We used the laminas-mail library. There was an issue with excessive encoding indeed (which is not against the standard but some clients have issue with it). But it has nothing to do with attachments.

                  In v9.1 we switched to another library so that this problem is not actual anymore.
              Working...