Forums › Forums › OroCRM › OroCRM – How do I? Questions › Email sync problems
This topic contains 32 replies, has 6 voices, and was last updated by ianfp 7 years, 5 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- February 15, 2016 at 5:37 pm #28758
I’m having a tough time with email sync. I’ve added two system mailboxes, given myself access to them via the “Access Management” rules, and configured both of them to create new cases. Both mailboxes are able to access the IMAP server (Google Apps for Business) and are configured to import email from one specific folder each. I have the ‘oro:cron’ task running in the background, and I can see activity in the System > Job Queue.
But… when I send email to either address, it is not imported nor is a case created. When my coworker sends an email to one of them (“webmaster”), it IS imported, but a case is NOT created. When he sends an email to the other address (“support”) it is NOT imported NOR is a case created.
The two mailboxes are different folders in different Gmail accounts, but the IMAP configuration for them in Oro is otherwise identical. The support mailbox is also being read by our current CRM (SugarCRM, which I am trying to migrate away from).
I’m at a loss for why only some emails sync, and why no cases are created. I need EVERY email send to either account to be synced and to be converted into a case.
Any help is most appreciated.
- CreatorTopic
- AuthorReplies
- May 11, 2016 at 9:05 am #28774
Yes and we are successfuly able to send message the problem is when sent from Oro it don’t show up in gnail sent BOx and when sent from gmail it don’t show up anywhere in oro
May 12, 2016 at 12:36 am #28775Okay, this is really weird. Let’s try one more scenario: Does your primary user email match the address you’ve entered in Email synchronization settings?
May 12, 2016 at 1:17 am #28776Hey Artem
our primary user email (super admin) is different then we enter in email sync but i dont think that should be reason why its not syncing sent email as thats the purpose to have IMAP if we cant use it for different users different IMAP then i think its not that useful feature
Let me know your thoughts
May 12, 2016 at 7:47 am #28777This might be the cause of the problem. IMAP/SMTP is needed to sync emails of your user, therefore the primary email should match the mailbox email.
Anyway, we will continue to investigate this problem. Thank you for bringing it up! Also, please check if matching emails will fix it for you.
Best regards
July 28, 2016 at 9:00 am #28778Hi,
I am a new user and would be grateful for your advice.
On attempting to implement Email Synchronization Settings for our initial user account, IMAP succeeds but SMTP fails (“Could not establish SMTP connection”).
Our settings are as follows:
“Enable SMTP” is ticked.
SMTP Host: secure.emailsrvr.com
SMTP Port: 465
Encryption: SSL
User: [correct user email address]
Password: [correct password]The user email address matches the email address used for the Oro CRM account.
We just installed Oro, yesterday, using the default Bitnami image at Google Cloud. The version is 1.9.6. Our email is hosted by Rackspace.
In case this helps, our first attempt at fetching emails into Oro failed, but after some period of time, without further effort on our part, the messages appeared.
Thank you for your help.
—
John Harris
john@fieldgram.comAugust 5, 2016 at 4:49 am #28779Hi John,
Do you have any logs of the IMAP sync job?
August 5, 2016 at 9:06 am #28780Thank you for your reply, Artem. I should be able to obtain those logs for you, though may have to obtain some help from a colleague in doing so. Let me report back to you, hopefully with the logs, over the weekend.
August 12, 2016 at 1:45 pm #28781Our email has been syncing very poorly lately — many emails appear in the inbox but are never imported into Oro. When I looked at System -> Job Queue and filtered by failed jobs, I saw why. Here’s a job result that appears to have two different errors:
1234567891011121314151617181920212223242526272829303132333435363738Resetting hanged email origins ...Updated 0 row(s).Finding an email origin ...Found "xxxx@xxxx.com (imap.gmail.com)" email origin. Id: 16.Get folders enabled for sync...Got 1 folder(s).The folder "Sales" is selected.Previous max email UID "14331"Found 62 email(s).The synchronization failed. Error: An exception occurred while executing 'INSERT INTO oro_email (created, subject, from_name, sent, importance, internaldate, is_head, message_id, multi_message_id, x_message_id, x_thread_id, refs, acceptLanguageHeader, body_synced, thread_id, email_body_id, from_email_address_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["2016-08-11 13:10:31", "Manager Here's Your \ud83c\udf81 Gift for this Independence Day", "\"HelloTravel.com\" <newsletter@smtp1.em.hellotravel.com>", "2016-08-01 13:57:54", 0, "2016-08-01 14:17:35", 1, "<17792826271656953@em.hellotravel.com>", null, "1541470741160406647", "1541470741160406647", null, "", null, null, null, 5754]:SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x8E\x81 G...' for column 'subject' at row 1The synchronization failed. Error: An exception occurred while executing 'INSERT INTO oro_email (created, subject, from_name, sent, importance, internaldate, is_head, message_id, multi_message_id, x_message_id, x_thread_id, refs, acceptLanguageHeader, body_synced, thread_id, email_body_id, from_email_address_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["2016-08-11 13:10:31", "Manager Here's Your \ud83c\udf81 Gift for this Independence Day", "\"HelloTravel.com\" <newsletter@smtp1.em.hellotravel.com>", "2016-08-01 13:57:54", 0, "2016-08-01 14:17:35", 1, "<17792826271656953@em.hellotravel.com>", null, "1541470741160406647", "1541470741160406647", null, "", null, null, null, 5754]:SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x8E\x81 G...' for column 'subject' at row 1Finding an email origin ...Found "xxxx@xxxx.com (imap.gmail.com)" email origin. Id: 18.Get folders enabled for sync...Got 1 folder(s).The folder "Support" is selected.Previous max email UID "1402"Found 1 email(s).Skip "Payment Transaction Failed Reminder" (UID: 1402) email, because it is already synchronised.The synchronization failed. Error: A new entity was found through the relationship 'Oro\Bundle\EmailBundle\Entity\EmailRecipient#emailAddress' that was not configured to cascade persist operations for entity: EmailAddress(xxxx@xxxx.com). To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}).The synchronization failed. Error: A new entity was found through the relationship 'Oro\Bundle\EmailBundle\Entity\EmailRecipient#emailAddress' that was not configured to cascade persist operations for entity: EmailAddress(xxxx@xxxx.com). To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}).Finding an email origin ...Found "xxxx@xxxx.com (imap.gmail.com)" email origin. Id: 17.Get folders enabled for sync...Got 1 folder(s).The folder "Jack" is selected.Previous max email UID "1740"Found 1 email(s).Skip "XXXX Purchase Order Change XXXX" (UID: 1740) email, because it is already synchronised.The synchronization failed. Error: A new entity was found through the relationship 'Oro\Bundle\EmailBundle\Entity\EmailRecipient#emailAddress' that was not configured to cascade persist operations for entity: EmailAddress(xxxx@xxxx.com). To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}).The synchronization failed. Error: A new entity was found through the relationship 'Oro\Bundle\EmailBundle\Entity\EmailRecipient#emailAddress' that was not configured to cascade persist operations for entity: EmailAddress(xxxx@xxxx.com). To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}).Finding an email origin ...Found "xxxx@xxxx.com (imap.gmail.com)" email origin. Id: 16.Exit because all origins have been synchronised.August 17, 2016 at 9:58 am #28782Hi,
Probably the database engine is enable to store four byte symbols, you must switch your database to utf8mb4 charset.
See this comment for detailed information.
August 17, 2016 at 10:19 am #28783Mike,
Thanks for the suggestion — I’ll try it out.
But I’d argue that this is still buggy behaviour on OroCRM’s part. As it stands, if one email contains a 4-byte character, then the *entire* IMAP sync process fails and I don’t get any of the subsequent emails! Shouldn’t each email insertion perhaps be its own database transaction so that one problematic email doesn’t halt the whole system?
August 18, 2016 at 1:12 am #28784Thanks for the suggestion — I’ll try it out.
Probably the database engine is enable to store four byte symbols, you must switch your database to utf8mb4 charset.
Magento 2 Social Login/Magento 2 Mega Menu/Social Login Magento 2/Mega Menu Magento 2[url=http://www.magestore.com/magento-2-social-login-extension.html/]Magento 2 Social Login[/url]/[url=http://www.magestore.com/magento-2-mega-menu-extension.html/]Magento 2 Mega Menu[/url]/[url=http://www.magestore.com/magento-2-social-login-extension.html/]Social Login Magento 2[/url]/[url=http://www.magestore.com/magento-2-mega-menu-extension.html/]Mega Menu Magento 2[/url]
August 18, 2016 at 3:12 am #28785Hi,
Can you send me this email which raise an exception on mkudelia@magecore.com as raw email file ?
August 18, 2016 at 4:41 am #28786August 18, 2016 at 9:33 am #28787I have the latest master version of oro application, mysql server version 5.5.48, charset is:
mysql> SELECT @@character_set_database, @@collation_database;
+————————–+———————-+
| @@character_set_database | @@collation_database |
+————————–+———————-+
| utf8 | utf8_general_ci |
+————————–+———————-+when i sent to oro email with subject which contains your symbol i successfully got email with cropped subject until “bad” symbol without any errors.
Can you tell me your OS, mysql version and charset?
P.S. I’m using macos.
August 18, 2016 at 12:13 pm #28788I’m running on Amazon RDS, MySQL Server version: 5.6.23-log MySQL Community Server (GPL).
I’ve since switched that server to utf8mb4, but the original settings were:
12345678910111213141516171819mysql> show variables like '%character_set_%';+--------------------------+--------------------------------------------+| Variable_name | Value |+--------------------------+--------------------------------------------+| character_set_client | utf8 || character_set_connection | utf8 || character_set_database | utf8 || character_set_filesystem | binary || character_set_results | utf8 || character_set_server | utf8 || character_set_system | utf8 |mysql> show variables like '%collation%';+----------------------+-----------------+| Variable_name | Value |+----------------------+-----------------+| collation_connection | utf8_general_ci || collation_database | utf8_general_ci || collation_server | utf8_unicode_ci | - AuthorReplies
The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.