Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-5035

changed company name not respected for email sender

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • None
    • Configuration

      Problem

      Company names commonly change after the setup of an instance. Therefore we have the config runtimeOptions.companyName. However, if you change the company name there, it will be used in the notification mail body but not as the name of the sender, here the first version will still be used.

      Solution

      Use the current value of runtimeOptions.companyName for the sender of the emails (so if companyName is changed, it should change resources.mail.defaultFrom.name, too)

      technical proposal

      • Problem: resources.mail.defaultFrom.name config is evaluated by Zend_Mail directly
      • But: We never use Zend_Mail directly, but always ZfExtended/Mail which extends Zend_Mail. If somewhere Zend_Mail is used directly this is a bug and must be fixed
      • So in ZfExtended/Mail we can just set the sender name the following way: 
        • As sender name we use still defaultFrom (which evaluates to defaults from application.ini values), but we define the company name as variable {companyName} and replace that string with the company name from the config. To make that work we have to re-set the defaultFrom in the ZfExtended/Mail since the config is loaded there already.
      • In instance:create script we change the setup so that defaultFrom is set as "{companyName} translate5" now, and we add as comment to the installation.ini that {companyName} is available as variable
      • For legacy installations we keep defaultFrom still set, for the production instances we can look through and replace the defaultFrom config manually where it fits to a pattern using {companyName}. If not, at least the comment that  {companyName} is available should be added to the installation.ini

            volodymyr@mittagqi.com Volodymyr Kyianenko
            sylviaschumacher Sylvia Schumacher
            Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: