Beispiel #1
0
 public function __construct(array $params)
 {
     foreach ($this->_try_backends as $backend) {
         try {
             $this->_backend = org_openpsa_mail_backend::get($backend, $params);
         } catch (midcom_error $e) {
             debug_add('Failed to load backend ' . $backend . ', message:' . $e->getMessage());
         }
     }
     throw new midcom_error('All backends failed to load');
 }
Beispiel #2
0
 public function __construct($backend = 'try_default', $backend_params = array())
 {
     $this->_component = 'org.openpsa.mail';
     parent::__construct();
     $this->encoding = $this->_i18n->get_current_charset();
     $this->_backend = org_openpsa_mail_backend::get($backend, $backend_params);
     $this->headers['X-Originating-IP'] = '[' . $_SERVER['REMOTE_ADDR'] . ']';
     $this->headers['X-Mailer'] = "PHP/" . phpversion() . ' /OpenPSA/' . midcom::get('componentloader')->get_component_version($this->_component) . '/' . get_class($this->_backend);
 }