src/email.php
protected static function load_config($config=null) {
	if ($config) {
		self::$config = $config;
		return;
	}
	
	$config_file = ROOT_DIR.'config/email.ini';
	if (file_exists($config_file) == false) {
		$exception = bootstrap::get_library('exception');
		throw new $exception('no email config found');
	}
	
	self::$config = parse_ini_file($config_file);
	
	// decode the password
	self::$config['pass'] = base64_decode(self::$config['pass']);
}
protected static function load_config($config=null) {
	if ($config) {
		self::$config = $config;
		return;
	}
	
	$config_file = ROOT_DIR.'config/email.ini';
	if (file_exists($config_file) == false) {
		$exception = bootstrap::get_library('exception');
		throw new $exception('no email config found');
	}
	
	self::$config = parse_ini_file($config_file);
	
	// decode the password
	self::$config['pass'] = base64_decode(self::$config['pass']);
}
protected static function load_config ( $ config = null ) { if ( $ config ) { self :: $ config = $ config ; return ; } $ config_file = ROOT_DIR . 'config/email.ini' ; if ( file_exists ( $ config_file ) == false ) { $ exception = bootstrap :: get_library ( 'exception' ) ; throw new $ exception ( 'no email config found' ) ; } self :: $ config = parse_ini_file ( $ config_file ) ; // decode the password self :: $ config [ 'pass' ] = base64_decode ( self :: $ config [ 'pass' ] ) ; }
collects the config for connecting from a ini file

@note the password is expected to be in a base64 encoded format
to help against shoulder surfing

@note sets self::$config with 'host', 'port', 'ssl', 'user', 'pass', 'from', 'name' values
collects the config for connecting from a ini file