Getting a grip on email issues

Hi. I decided to start this thread because of @fcorluka who made a bunch of posts today on Github about the issue of faulty “from name” settings. Thanks! This definitely needs to be stirred up. :+1:

I think the Issue is currently too confusing for developers, and we need to organize ourselves in order to progress this issue, and other email issues.

So the difficulties I see are:

  1. We are unsure of the status of old issues mentioning old versions
  2. Some things are fixed in the code but are only effective when people create a new account. If their account was broken before the fix, and they don’t create a new one, the bug is fixed but the symptom is still there…
  3. Some issues are not 100% clear on the steps to reproduce. There are many screens for email configuration in SuiteCRM, and the order of the steps is not indifferent (e.g. if you hit “Test send email” before saving account or not).
  4. Some people don’t check their logs, others check only suitecrm.log but not the PHP log, and often they don’t say when the message happened.

We can get around these by

  1. Concentrating EXCLUSIVELY on behaviours found in 7.10.24 or 7.11.12.
  2. Run all our tests and diagnosis on clean systems or at least with cleared Email accounts. Just delete them and start over, every time.
  3. More precise steps to reproduce
    a. Always say if you’re using an Admin account or other
    b. Always say exactly which screen you used to set up the account.
    c. Always say exactly all the steps to get there (e.g. User profile / Email Settings / Settings button / Mail accounts tab / Outgoing servers / Add button)
    d. Always pay attention and specify all steps inside that dialog box, especially related to the test email attempts.
  4. More precise logging information.
    a. You need to always check both suitecrm.log and php_errors.log (or whatever it is called in your php.ini definitions).
    b. Connect logs to UI behaviours. Be exhaustive here. Say if an error appears before or right after sending the test email; or when defining the account; or when composing the email; or after sending it; or in a Campaign etc.
    c. Uncomment this and this for extra information.

Other things you can do:

  1. Help us close Github Issues that are outdated, duplicated, or badly formulated by evaluating them and suggesting what needs to be done
  2. Ask me for help if any of the above is not clear to you (e.g. how to find the logs). Use this topic here for that, but not to go into specific email issues; this is about how we, as a Community, are able to tackle them more effectively.

@fcorluka if you can help I would like to start with the “From name” issue that you’re facing. Is there a complete and accurate GitHub Issue for it already? Can we make one?


Hi @pgr, thank you for bringing this up, I appreciate it.
I agree with most of the things you have written, except about the version of SuiteCRM. 7.11 is not an LTS, anis d logically good practice would be to only have (on productions) LTS version. Maybe I am wrong, correct me.

I did ‘made a bunch of posts today on Github’ as You say, and because of a problem which is not operational critical, but is wrong in many many ways. Unfortunately, this is only one of the problems I have with EMAILS.
On GitHub issues 7692, 8177 and 8264 talk about the same thing.
Fix (8264) that is proposed is only partial. In my case, I have 5 email addresses, and I need all of them to be active (inbound and outbound ).
But when a user tries to reply from one of the email account happens next:

  • from address is correct and says email account address

  • from name is wrong and says the name of the person you are trying to reply to (at first it looks like he is replying to himself).

I worked around this code today, and it is very very very very complicated code.
To get this fully to work, you should change function (8264) fix chnages first part but other is very important:
protected function fillDataAddressFromPersonal($dataAddresses)
from : modules/Emails/EmailsDataAddressCollector.php

Original code:

    $dataAddresses[$address]['attributes'] = [
                    'from' =>$fromString,
                    'name' => $userAddress['attributes']['name'],
                    'oe' => $userAddress['attributes']['oe'],
                    'reply_to' => $replyString

My change:

$dataAddresses[$address]['attributes'] = [
                    'from' => "{$userAddress['attributes']['name']}<{$userAddress['attributes']['from']}>",
                    'name' => $userAddress['attributes']['name'],
                    'oe' => $userAddress['attributes']['oe'],
                    'reply_to' => $replyString

I also need to change reply_to in the same way, and then I believe it would be OK.