Email Settings

Hi, i am new on suiteCRM. I have set up the email with the configuration parameters from 1and1 but the system is giving me a “Communication Failure” after it takes almost 5 minutes performing the task of sending a test email. Can someone help me with this problem? BTW, i would love to send a screenshot but i do not why it doesn´t upload anything, so if someone needs them i will be happy to send them by email.

You can put screenshots on https://pasteboard.co and paste the link here.

If you have error messages from the “send test mail” please post them here - the SMTP full log thing (only available on the latest versions of each branch, so 7.8.15, 7.9.14 and 7.10)

Hi, i could not use pasteboard.co, maybe because i never used before so i am uploding it to my server and sharing the link. I also add here the full log, so you can see what is the problem if that helps, please download here: https://we.tl/pOO0kNAyqt

What is your SuiteCRM version? And PHP version?

If you upgrade to the latest, you might get more info on that screen.

Also, if you can check both your logs at the time of that error, there should be clues there.

suiteCRM Ver. 7.10
PHP 7.1

I think that 1and1 don give me access to the PHP logs.

Yesterday i deleted all email details and start from 0. Now i have this problem from the log file:

Tue Feb 27 09:48:54 2018 [30666][1][SECURITY] User Administrator attempted to send an email using incorrect email account settings in which they do not have access to.

What to do?

You’re probably trying to send from a system account (defined in Admin / Email Outbound settings), from a user’s area. You can either set up a user account (from the users profile) or go back into the system account and tick a checkbox saying something like “allow users to send from this account”.

So, i have done what you told me and still not work in any of the 2 solutions you gave me. Is there any possibility that suiteCRM can help me to solve the problem even if i need to buy a support ticket for this problem?

There is Documentation here, this might help you: https://docs.suitecrm.com/user/modules/email-settings/

I don’t fully understand your last message, sorry: you tried changing the checkbox in system, or you tried setting up a user’s email in the user’s profile? Do you get the exact same behaviour and error in logs?

I tried changing the checkbox in system and tried setting up a user’s email in the user’s profile and now the hole system get bloked and i cant do nothing fpor a few minutes. Here is the log since i tried to send the last test email:

Tue Feb 27 11:20:38 2018 [15391][1][FATAL] SugarPHPMailer encountered an error: An outgoing mail server is not configured to send emails. Please configure an outgoing mail server or select an outgoing mail server for the mail account that you are using in Settings >> Mail Account.
Tue Feb 27 11:20:38 2018 [15391][1][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Tue Feb 27 11:20:38 2018 [15391][1][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Tue Feb 27 11:20:38 2018 [15391][1][FATAL] Error updating table: emails_text: Query Failed: UPDATE emails_text
					SET `from_addr`=NULL,`reply_to_addr`='info@asiateaching.com',`to_addrs`='crl.traders@gmail.com',`cc_addrs`=NULL,`bcc_addrs`=NULL,`description`='test \n ',`description_html`='<p>test </p>\n<div class=\"email-signature\"> </div>',`raw_source`=NULL
					 WHERE  emails_text.email_id = 'a8098676-1a5c-0a6a-6243-5a952fbbf25c' AND deleted=0: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:38 2018 [15391][1][FATAL] Exception handling in /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/Controller/SugarController.php:402
Tue Feb 27 11:20:38 2018 [15391][1][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.
Tue Feb 27 11:20:38 2018 [15391][1][FATAL] backtrace:
#0 /homepages/25/d723756268/htdocs/asiateaching/crm/include/database/DBManager.php(353): sugar_die('Database failur...')
#1 /homepages/25/d723756268/htdocs/asiateaching/crm/include/database/DBManager.php(328): DBManager->registerError('Error updating ...', 'Error updating ...', true)
#2 /homepages/25/d723756268/htdocs/asiateaching/crm/include/database/MysqliManager.php(167): DBManager->checkError('Error updating ...', true)
#3 /homepages/25/d723756268/htdocs/asiateaching/crm/include/database/DBManager.php(596): MysqliManager->query('UPDATE emails_t...', true, 'Error updating ...')
#4 /homepages/25/d723756268/htdocs/asiateaching/crm/modules/Emails/Email.php(1639): DBManager->update(Object(EmailText))
#5 /homepages/25/d723756268/htdocs/asiateaching/crm/modules/Emails/Email.php(1450): Email->saveEmailText()
#6 /homepages/25/d723756268/htdocs/asiateaching/crm/modules/Emails/EmailsController.php(189): Email->save()
#7 /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/Controller/SugarController.php(523): EmailsController->action_send()
#8 /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/Controller/SugarController.php(491): SugarController->do_action()
#9 /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/Controller/SugarController.php(465): SugarController->handle_action()
#10 /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/Controller/SugarController.php(373): SugarController->process()
#11 /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/SugarApplication.php(109): SugarController->execute()
#12 /homepages/25/d723756268/htdocs/asiateaching/crm/index.php(52): SugarApplication->execute()
#13 {main}
Tue Feb 27 11:20:38 2018 [15645][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:38 2018 [16710][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:38 2018 [17681][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:38 2018 [20327][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:38 2018 [20481][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:38 2018 [20381][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:38 2018 [19245][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:38 2018 [20775][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:38 2018 [18847][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:38 2018 [20752][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 11:20:59 2018 [23758][1][FATAL]  Query Failed: DESCRIBE versions: MySQL error 1146: Table 'db725505089.versions' doesn't exist
Tue Feb 27 11:20:59 2018 [23758][1][FATAL]  Query Failed: SHOW INDEX FROM versions: MySQL error 1146: Table 'db725505089.versions' doesn't exist
Tue Feb 27 11:20:59 2018 [23758][1][FATAL]  Query Failed: select * from versions: MySQL error 1146: Table 'db725505089.versions' doesn't exist

You have a pretty serious database failure there, let’s hope it happened just once and won’t happen again. That is probably what caused the system to slow down for a while.

I’m hoping the email error is not related to this. Anyway, with this error (SMTP failure) you should be getting a message box when you send the test email, with a link to “show full SMTP log”. Please have a look at it, or post it here if you don’t understand it.

i does always the same, this one i had it blocked for about 2 hours and nothing, it gets to a screen where it is like sending but do not pass from there so no way to get to the show full SMTP log. This is the newest log:

Tue Feb 27 14:13:14 2018 [27911][1][FATAL] SugarPHPMailer encountered an error: An outgoing mail server is not configured to send emails. Please configure an outgoing mail server or select an outgoing mail server for the mail account that you are using in Settings >> Mail Account.
Tue Feb 27 14:13:14 2018 [27911][1][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Tue Feb 27 14:13:14 2018 [27911][1][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Tue Feb 27 14:13:14 2018 [27911][1][FATAL] Error updating table: emails_text: Query Failed: UPDATE emails_text
					SET `from_addr`=NULL,`reply_to_addr`='info@asiateaching.com',`to_addrs`='crl.traders@gmail.com',`cc_addrs`=NULL,`bcc_addrs`=NULL,`description`=' \ntest 2',`description_html`='<p> </p>\n<div class=\"email-signature\">test 2</div>',`raw_source`=NULL
					 WHERE  emails_text.email_id = '8370c5bc-b0b5-d06e-9e79-5a9558797e67' AND deleted=0: MySQL error 2006: MySQL server has gone away
Tue Feb 27 14:13:14 2018 [27911][1][FATAL] Exception handling in /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/Controller/SugarController.php:402
Tue Feb 27 14:13:14 2018 [27911][1][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.
Tue Feb 27 14:13:14 2018 [27911][1][FATAL] backtrace:
#0 /homepages/25/d723756268/htdocs/asiateaching/crm/include/database/DBManager.php(353): sugar_die('Database failur...')
#1 /homepages/25/d723756268/htdocs/asiateaching/crm/include/database/DBManager.php(328): DBManager->registerError('Error updating ...', 'Error updating ...', true)
#2 /homepages/25/d723756268/htdocs/asiateaching/crm/include/database/MysqliManager.php(167): DBManager->checkError('Error updating ...', true)
#3 /homepages/25/d723756268/htdocs/asiateaching/crm/include/database/DBManager.php(596): MysqliManager->query('UPDATE emails_t...', true, 'Error updating ...')
#4 /homepages/25/d723756268/htdocs/asiateaching/crm/modules/Emails/Email.php(1639): DBManager->update(Object(EmailText))
#5 /homepages/25/d723756268/htdocs/asiateaching/crm/modules/Emails/Email.php(1450): Email->saveEmailText()
#6 /homepages/25/d723756268/htdocs/asiateaching/crm/modules/Emails/EmailsController.php(189): Email->save()
#7 /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/Controller/SugarController.php(523): EmailsController->action_send()
#8 /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/Controller/SugarController.php(491): SugarController->do_action()
#9 /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/Controller/SugarController.php(465): SugarController->handle_action()
#10 /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/Controller/SugarController.php(373): SugarController->process()
#11 /homepages/25/d723756268/htdocs/asiateaching/crm/include/MVC/SugarApplication.php(109): SugarController->execute()
#12 /homepages/25/d723756268/htdocs/asiateaching/crm/index.php(52): SugarApplication->execute()
#13 {main}
Tue Feb 27 14:13:14 2018 [28038][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 14:13:14 2018 [28018][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 14:13:14 2018 [29182][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 14:13:14 2018 [31487][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 14:13:14 2018 [35798][-none-][FATAL] Retrieving record by id users:1 found  Query Failed: SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1: MySQL error 2006: MySQL server has gone away
Tue Feb 27 15:59:27 2018 [23044][1][FATAL]  Query Failed: DESCRIBE versions: MySQL error 1146: Table 'db725505089.versions' doesn't exist
Tue Feb 27 15:59:27 2018 [23044][1][FATAL]  Query Failed: SHOW INDEX FROM versions: MySQL error 1146: Table 'db725505089.versions' doesn't exist
Tue Feb 27 15:59:27 2018 [23044][1][FATAL]  Query Failed: select * from versions: MySQL error 1146: Table 'db725505089.versions' doesn't exist

I think you really need to fix your database, before anything.

 MySQL error 2006: MySQL server has gone away

That is a serious database malfunction, there is no way SuiteCRM is going to function properly while you have that happening.

You could be having disk failure, database corruption, index corruption. Please look online for ways to diagnose and fix that kind of problem.

Hi,

where do I find the full smtp log on my server?
I am on 9.14 version.

Best Werner

In Admin settings, go to Diagnostic tool, then do a diagnostic and download the file, inside the file you can find it.

1 Like

No, that’s not it.

The “full SMTP log” is a new feature that you can find in the “Send test email” buttons, it only shows when the sending fails.

I know it’s in 7.10, I think it’s also in the latest 7.9.14 and 7.8.15, but I’m not so sure.

Thank you. I am looking for this log (mentioned above):

the SMTP full log thing (only available on the latest versions of each branch, so 7.8.15, 7.9.14 and 7.10)

ok I got it. It is in 7.9.14

Hi pgr,

the email settings are rigide regarding rights. An admin cannot test the outgoing emails as an exampel.
when an admin tries to test a personal outgoing email address in the mentioned smtp log is written, that the authentification towards the Email provider is not correct and in the suitecrm is written, that the admin does not have the rights.
It would help to get an error message directly in the browser when sending emails is prohibited by rights.

It took me a long time to understand, that a personal Email adress is nessesary to show up the group emails and that the outgoing server for personal emails has to be added in the personal profile under the personal email settings (add outgoing smtp mail server). So I believe, that the admin outgoing email menu should be only related to group emails because only these Outbound emails show up when composing an email. An admin can open an outgoing personal email entry but it is useless. It does not show up in a profil and it cannot be tested. It would be clearer if outgoing personal emails are only related to personal profiles. Even though I think emails settings should not be something user have to take care about.

I like your support.

Best

Werner

Thanks, this kind of feedback is very useful.

Please see this Issue I opened here: https://github.com/salesagility/SuiteCRM/issues/5376

I am also concerned with the unnecessary complexity in all this.

Let me try and break down the two complaints you explained

Issue A ----------------------

[quote]An admin cannot test the outgoing emails as an example. When an admin tries to test a personal outgoing email address in the mentioned smtp log is written, that the authentification towards the Email provider is not correct and in the suitecrm is written, that the admin does not have the rights.
It would help to get an error message directly in the browser when sending emails is prohibited by rights.[/quote]

Sometimes the problem is that there is a mismatch between the address your sending from, and the “From” and “From Name” fields. So for example, if you’re using a Gmail account you must fill in the “from” and “from name” fields correctly, otherwise Gmail will refuse to send. Other providers may allow it.

I fear that in some occasions SuiteCRM isn’t filling these two fields correctly. You can check this by un-commenting this line
https://github.com/salesagility/SuiteCRM/blob/master/include/SugarPHPMailer.php#L446

and you can replace some of those values, for tests, by un-commenting the lines before.

If you can reach a test where you understand exactly what’s going on, and you feel SuiteCRM is using wrong values, or giving a misleading message, please let me know.

Issue B ----------------------

I am not very familiar with Group emails, so I don’t understand this very well. Sorry.

What is the use you have planned for a Group account? I mean, why aren’t you using only personal accounts? This will help me understand better what you’re trying to achieve.

Thanks

1 Like