Can send test mails but not from contact page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SpeedBullet
    Senior Member
    • Mar 2016
    • 123

    Can send test mails but not from contact page

    Hi, I configured SMTP with my server info and also an IMAP account. On the admin page I clicked the "test connection" button and it reports that it was succesful. Next, I clicked "send test mail" and this mail also gets sent successfully. I also receive the test mail correctly. Emails also get imported correctly, both sent and received mails.

    Then, when I go to a contact and compose an email and click "send", it doesn't work! I get the following message:

    error 500: incorrect authentication data
    Next, when I check the data/logs/LOGFILE-of-today

    [2016-08-26 22:24:09] Espo.ERROR: API [POST]:/:controller, Params:Array ( [controller] => Email ) , InputData: {"status":"Sending","to":"info@b.......m","nameHas h":{"info@b.......m":"Test Person"},"isRead":true,"isImportant":false,"inTras h":false,"folderId":false,"isUsers":false,"isHtml" :true,"isSystem":false,"isJustSent":false,"assigne dUserId":"1","assignedUserName":"My Name","attachmentsIds":[],"attachmentsNames":{},"attachmentsTypes":{},"body ":"<p><br></p><br><p><br></p><p>Kind regards,<br>My Name again<br></p>","subject":"this is the subject","from":"info@b...........e","cc":"","bcc" :"","parentType":"Account","parentName":null,"pare ntId":null,"selectTemplateName":null,"selectTempla teId":null,"bodyPlain":"\n\n\n\n\n\n\nKind regards,\nMy Name again\n\n\n"} - Incorrect authentication data [] []
    [2016-08-26 22:24:09] Espo.ERROR: Display Error: Incorrect authentication data , Code: 500 URL: /api/v1/Email [] []
    What could be the problem? Sending test mails works, but not sending a mail via the contact>compose function... PS I removed some data for privacy reasons.
  • yuri
    Member
    • Mar 2014
    • 8511

    #2
    Hello,

    Do you send emai from system email address? Maybe it uses SMTP credentials from Preferences or Personal Email Account?
    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

    • SpeedBullet
      Senior Member
      • Mar 2016
      • 123

      #3
      Yes I'm the only user on this new setup. So system / user account is the same. Sending mail works when I don't use SMTP but I need to use SMTP. Is it possible to debug this more deeply? Strange thing is that sending test mail works but a mail from the "compose" screen doesn't work.

      Comment

      • iscon
        Active Community Member
        • May 2014
        • 187

        #4
        Copy your email_address table and entity_email_address to soemthing else. Empty both and enter a new email for your contact. Try again. Sometimes corrupted email addresses cause this strange error.
        ------------------
        Robert Laussegger
        iscon group
        http://www.iscongroup.net
        mailto://info@iscongroup.net

        Comment

        • yuri
          Member
          • Mar 2014
          • 8511

          #5
          Maybe it tries credentials form Preferences since system and user's addresses are same.
          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

          • SpeedBullet
            Senior Member
            • Mar 2016
            • 123

            #6
            iscon your suggestion didn't work out. Still the same error
            yuri yeah it's possible. What can I do to help debug this problem?

            Comment

            • yuri
              Member
              • Mar 2014
              • 8511

              #7
              If user's email address the same as system email address. Try to fill credentials in your preferences.
              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

              • SpeedBullet
                Senior Member
                • Mar 2016
                • 123

                #8
                I discovered that in my user preferences, the SMTP username had an extra space behind it. Invisible to the eye but still there and preventing the login from being successful. Embarrassing! I removed the extra space and now of course it works. Thanks for pointing me in the right direction. Perhaps a trim() onsave would have been useful to prevent this (copy/pasted and accidentally added space).

                Comment

                • yuri
                  Member
                  • Mar 2014
                  • 8511

                  #9
                  I will check. Thanks
                  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

                  Working...