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

Not configured mail server may crash application

    XMLWordPrintable

Details

    • Critical

    Description

      On new (or moved) installations it may happen that the mail server is not configured properly. Since the application sends several mails this is leading to "PHP Fatal error: Uncaught Zend_Mail_Transport_Exception: Unable to send mail." which then breaks the whole application flow.

      Therefore each Zend_Mail->send usage should be encapsulated in a try catch which catch the Zend_Mail_Transport_Exception, writes this fact to the log with the logger. (Best way is to replace the Zend_Mail default transport with the Zend_Mail_Transport_File BEFORE creating the log entry). See solution with ZfExtended_Mailer at the bottom.

      The Zend_Mail is used currently in:

      ZfExtended_Mail → extends the Zend_Mail, but ZfExtended_Mail can not be used for the below purposes
      ZfExtended_Logger_Writer_DirectMail
      ZfExtended_Logger_Summary
      Models_Installer_Standalone

      So as solution:
      Extend Zend_Mail with ZfExtended_Mailer. Add there the try/catch in the send function.
      Use this new Mailer instead of Zend_Mail at the above places.

      • move the runtimeOptions.sendMailDisabled check from old ZfExtended_Mail to new ZfExtended_Mailer method
      • Rename the existing ZfExtended_Mail to ZfExtended_TemplateBasedMail

      Attachments

        Activity

          People

            aleksandar Aleksandar Mitrev
            tlauria Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: