Example #1
0
 public function reset()
 {
     $this->mailer_object->Timeout = SilkApplication::get_preference('mail_timout');
     $this->mailer_object->Mailer = SilkApplication::get_preference('mail_mailer');
     $this->mailer_object->Host = SilkApplication::get_preference('mail_host');
     $this->mailer_object->Port = SilkApplication::get_preference('mail_port');
     $this->mailer_object->SMTPAuth = SilkApplication::get_preference('mail_smtpauth');
     $this->mailer_object->Username = SilkApplication::get_preference('mail_smtpauthuser');
     $this->mailer_object->Password = SilkApplication::get_preference('mail_smtpauthpw');
     $this->mailer_object->Sendmail = SilkApplication::get_preference('mail_sendmail');
     $this->mailer_object->FromName = SilkApplication::get_preference('mail_fromuser');
     $this->mailer_object->From = SilkApplication::get_preference('mail_from');
     $this->mailer_object->ClearAddresses();
     $this->mailer_object->ClearAttachments();
     $this->mailer_object->ClearCustomHeaders();
     $this->mailer_object->ClearBCCs();
     $this->mailer_object->ClearCCs();
     $this->mailer_object->ClearReplyTos();
 }
Example #2
0
/**
 * Returns the global SilkApplication singleton.
 */
function silk()
{
    return SilkApplication::get_instance();
}
 /**
  * Gets the given site prefernce
  *
  * @since 0.6
  */
 public static function get_preference($prefname, $defaultvalue = '')
 {
     $value = $defaultvalue;
     if (count(self::$siteprefs) == 0) {
         self::$siteprefs = SilkCache::get_instance()->call('SilkCache::load_site_preferences');
     }
     if (isset(self::$siteprefs[$prefname])) {
         $value = self::$siteprefs[$prefname];
     }
     return $value;
 }