Upgrading to SuiteCRM 7.11 - sending Customer emails does not work

Hi All

thanks for excellent CRM suite, I was behind of updates for some year, I now migrated to latest version. Which absolutely is much more up-to-date than previous Sugar was.

However after migration sending customer emails stopped to work. I have configured Inbound and Outbound emails, I am able to send test mails properly and also access mailboxes with IMAP. Also Mozaik that I use to edit emails, shows drop-down menu with Outbound accounts there correctly.

But no matter how I set the email accounts, there are always same sending errors after hitting the Send button. Errors are visible in Suite logs, to me it looks that Suite/Email sender is not able to access necessary mail account information to populate email sending properly, it definitely looks to be a bug.

Any idea how to correct the situation? As this is quite frustating, as I cannot send outbound mails at all

Tue Feb 5 10:57:57 2019 [5614][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] Pop error level. Try to remove the error_reporting() function from your code.
Tue Feb 5 10:57:57 2019 [5614][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] Pop error level. Try to remove the error_reporting() function from your code.
Tue Feb 5 10:57:57 2019 [5614][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] EmailController::action_getFromFields() expects an outbound email id as stored option of inbound email (581821f5-0be4-4b0f-3f35-5c5890f6c335) but it isn’t set.
Tue Feb 5 10:57:57 2019 [5614][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] EmailController::action_getFromFields() panic: An error occurred! (202)
Tue Feb 5 10:57:57 2019 [5614][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] Incorrect “replay to” format found: markku@steepwalk.fi
Tue Feb 5 10:57:57 2019 [5614][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] EmailController::action_getFromFields() error: 205
Tue Feb 5 10:57:57 2019 [5614][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] Signature html not found!
Tue Feb 5 10:57:57 2019 [5614][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] Signature plain text not found!
Tue Feb 5 10:57:57 2019 [5614][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] EmailController::action_getFromFields() is Panicking: Reply-To address is not filled.
Tue Feb 5 10:57:57 2019 [5614][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] Pop error level. Try to remove the error_reporting() function from your code.
Tue Feb 5 10:58:03 2019 [5032][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] Pop error level. Try to remove the error_reporting() function from your code.

Hi,
Have you re-set the files permissions after upgrading to new version?

If yes, then we need to check email server settings and CRM settings both. Have you allowed SMTP from your email server/account as well??

Thanks Sohaib,

Yes, with following:

top dir
chmod -R 755

in top dir
chmod -R 775 cache custom modules themes data upload config_override.php

Markku

Can you join me by skype so that we can communicate more fast?

Hi Sohaib

pls notice that test emails from SuiteCRM are sent OK, as based on short .php check the sending logic is different from actual SuiteCRM email sending logic. And also before upgrade smtp outbound was working fine.

br Markku

Well. Ok. Basically it depends upon the code and file, from where you are trying to send the email. And also how you have done the coding.
Can you please share the email sending code here. The code snippets so that i can take a look. If it was working before then there will be some exception.

Hello Sohaib,

I attached email settings and also sending dialog for your reference. SuiteCRM Installation is out-of-the box upgrade SuiteCRM-Upgrade-7.10.x-to-7.11.1.zip. So no customization of code has been made, to any parts of the installation.

I also just noticed that also Notify on Assignment: email that can be ticked in Advanced tab in User profile are also sent OK.
So test mails are sent ok,
Notify on Assingment are sent ok and
IMAP access to mailbox is OK.

But sending Customer emails through standard Mozaik dialog leads to errors as above.

br Markku

Can you please try to change REPLY TO email address for testing only to any gmail address, so that we can check if the code is accepting it or not?
if you come to skype, time is saved. Forum is too slow.

Hello

seems to stop to before actual sending, as email address is not validated in SuiteCRM side:

Tue Feb 5 12:39:35 2019 [5684][8e55fd63-1162-b0d8-3d65-5c496a6b1cbd][ERROR] Invalid email address given: [Markku Penttila <markku.penttila9999@gmail.com] Called at /var/www/html/sugarcrm/modules/Emails/EmailsController.php:243 from function populateBeanFromRequest.

What hits to eye is that error row is missing some chars, as closing > is missing in the email inside [ ]: [Markku Penttila <markku.penttila9999@gmail.com]
I am not sure if this means anything at all?

We could have skype after two hours or so, as I will be absent for a while.

br Markku

Ok. then i will be able to check. Not looking so simple.

Hello Sohaib,

I was able to find some more. in Phpmyadmin db query shows that email address is intially misparsed there. I tried to correct the address manually, but SuiteCRM automatically adds address without > in the end.

Please see attached screen shot of db rows.

So I justify that there has maybe been changes in email account setup for version 7.11 and and there is now a bug in email address parsing.

br Markku

Oh,
It looks as you are including NAME with EMAIL address in the SMTP settings in Email Configuration area. If this is not the case, then there is an issue with SUITECRM core files.

You can report this issue at GITHUB.
Thanks

I’ve had a similar problem after upgrading to 7.11.1. Mails not sent. I get the modal with the icon spinning. My logs are:


[Thu Feb 07 14:20:01.443915 2019] [proxy_fcgi:error] [pid 9197:tid 140409553606400] [cliente XXX.XXX.XXX.XXX:XXXXX] AH01071: Got error 'PHP message: PHP Catchable fatal error:  Object of class EmailAddress could not be converted to string in /var/www/html/suitecrm-produccion/web/modules/Emails/Email.php on line 4737\nPHP message: PHP Stack trace:\nPHP message: PHP   1. {main}() /var/www/html/suitecrm-produccion/web/index.php:0\nPHP message: PHP   2. SugarApplication->execute() /var/www/html/suitecrm-produccion/web/index.php:52\nPHP message: PHP   3. EmailsController->execute() /var/www/html/suitecrm-produccion/web/include/MVC/SugarApplication.php:109\nPHP message: PHP   4. EmailsController->process() /var/www/html/suitecrm-produccion/web/include/MVC/Controller/SugarController.php:373\nPHP message: PHP   5. EmailsController->handle_action() /var/www/html/suitecrm-produccion/web/include/MVC/Controller/SugarController.php:465\nPHP message: PHP   6. EmailsController->do_action() /var/www/html/suitecrm-produccion/web/include/MVC/Controller/SugarController.php:491\nPHP message: PHP   7. EmailsController->action_send() /var/www/html/suitecrm-produccion/web/include/MVC/Controller/SugarController.php:523\nPHP message: PHP   8. Email->save() /var/www/html/suitecrm-produccion/web/modules/Emails/EmailsController.php:248\nPHP message: PHP   9. Email->saveEmailAddresses() /var/www/html/suitecrm-produccion/web/modules/Emails/Email.php:1587\nPHP message: PHP  10. Email->sendOptInEmailToEmailAddressById() /var/www/html/suitecrm-produccion/web/modules/Emails/Email.php:1709\n', referer: http://xxx.yyy/index.php?action=ComposeViewWithPdfTemplate&module=Emails&return_module=AOS_Quotes&return_action=DetailView&return_id=16a1b627-b59a-4aae-f2d4-5c5c5ca12596&record=f1d3bb09-332d-24c3-9b1f-5c5c662855d8
[Thu Feb 07 14:23:05.801039 2019] [proxy_fcgi:error] [pid 9197:tid 140408025761536] [client XXX.XXX.XXX.XXX:49375] AH01071: Got error 'Primary script unknown\n', referer: http://xxx.yyy/cache/themes/SuiteP/css/Dawn/style.css?v=3jZqKnF57UTsfPAQWbuQOw
[Thu Feb 07 14:26:29.813286 2019] [proxy_fcgi:error] [pid 9196:tid 140408856246016] [client XXX.XXX.XXX.XXX:49404] AH01071: Got error 'PHP message: PHP Catchable fatal error:  Object of class EmailAddress could not be converted to string in /var/www/html/suitecrm-produccion/web/modules/Emails/Email.php on line 4737\nPHP message: PHP Stack trace:\nPHP message: PHP   1. {main}() /var/www/html/suitecrm-produccion/web/index.php:0\nPHP message: PHP   2. SugarApplication->execute() /var/www/html/suitecrm-produccion/web/index.php:52\nPHP message: PHP   3. EmailsController->execute() /var/www/html/suitecrm-produccion/web/include/MVC/SugarApplication.php:109\nPHP message: PHP   4. EmailsController->process() /var/www/html/suitecrm-produccion/web/include/MVC/Controller/SugarController.php:373\nPHP message: PHP   5. EmailsController->handle_action() /var/www/html/suitecrm-produccion/web/include/MVC/Controller/SugarController.php:465\nPHP message: PHP   6. EmailsController->do_action() /var/www/html/suitecrm-produccion/web/include/MVC/Controller/SugarController.php:491\nPHP message: PHP   7. EmailsController->action_send() /var/www/html/suitecrm-produccion/web/include/MVC/Controller/SugarController.php:523\nPHP message: PHP   8. Email->save() /var/www/html/suitecrm-produccion/web/modules/Emails/EmailsController.php:248\nPHP message: PHP   9. Email->saveEmailAddresses() /var/www/html/suitecrm-produccion/web/modules/Emails/Email.php:1587\nPHP message: PHP  10. Email->sendOptInEmailToEmailAddressById() /var/www/html/suitecrm-produccion/web/modules/Emails/Email.php:1709\n', referer: http://xxx.yyy/index.php?module=Emails&action=ComposeView&return_module=Emails&return_action=index

https://github.com/salesagility/SuiteCRM/issues/6899

IMy problem with 7.11 and outbound emails is that FROM dropdown shows no entries. All of the outbound email accounts work in test mode. Any thoughtds?

My problem has nothing to do with the email send issues for 7.11.1 - sorry. I found the solution here

The important bit is in #55037 which is as follows:

Create new group email account in Inbound email
Go to user profile page.Here we have the option for ‘email setting’.
Please confirm your email is correct.
Then click on the ‘setting’ button.
Popup box is came after click the setting button.
Click ‘mail accounts’ tab and in the Mail Accounts section check the ACTIVE box and save.