Configuration

 

Variables & Globals

The configuration is pretty simple. There's a globally used $cfg[]-array which contains pretty everything. The used profiles are parsed in ./obj/uw_config.inc and the keys are set like this: $cfg[key]="value".

Further information can be found in the chapter [D] Styling.
Feel free to print it!

<?php print_r($cfg); ?>

$cfg['beta']

This key has a boolean value and could be set to true for viewing additional information, e.g. the requested imap-strings.
It instructs webmail to store additional information in $_COOKIE['error'] which is viewed at the end of each single page.

To remove it from the single page, edit its template (e.g. ./tpl/message.xhtml and remove {VAR:error}, which is replaced by the index file.

 

Predefined Profiles

webmail uses its own predefined profiles.
They are stored in the file ./obj/ec_profiles.inc

Structure:

Well, they are pretty simple. Profiles are stored in the $pfs[]-array.
You are able to create another profile containing the main keys only by pasting it in the second line (directly after the "<?php"-tag). The first appearing $pfs[]-array in the file is the default file, parsed and available with the ID $pfs[0].

$pfs[]=array(
 "provider"  => "example mail service",
 "real_host" => "example.com",           # user@example.com
 "imap_host" => "mail.example.com/pop3", # /pop3 defines it as a pop3-server
 "imap_port" => 110,                     # default ports for: imap: 143 / pop3: 110
 "imap_mailpath" => "mail/",             # e.g. mailpath for gmail is [Google Mail]/
 "imap_mainbox"  => "INBOX",             # default mailbox
 "example" => "web133p7",                # example login for users viewed in ?login
 "hint" => "1337 mailservice =)",
 "usermap" => array(                     # usermap: account => real name
  'web133p7' => 'leet',
  'web133p8' => 'admin')
);
 

External Profiles

webmail is able to parse files in its own profile format, called *.uwp.
You are able to set any $cfg[]-Variable that is used for the imap connection.

Structure:

The config between the uwmail_profile-tags in the file is parsed:

{uwmail_profile}
...
{/uwmail_profile}

You are able to set the cfg[]-Variables according to this scheme:

name:value;

For creating a properly working profile you have to make sure the needed main keys are set, the file could look like this:

 {uwmail_profile}
 provider:example host;
 real_host:example.com;
 imap_host:imap.example.com;
 imap_port:143;
 imap_mailpath:mail/;
 imap_mainbox:INBOX;
 {/uwmail_profile}

You are also able to set the imap flags manually (e.g. to force an encrypted ssl-connection).
Further an example and the hint (both viewed in ?login) are nice things to alleviate the login-page for other users.

 imap_flags:/ssl/service=imap4rev1;
 example:web133p7;
 hint:additional information;

Using the *.uwp-file:

After creating the file, you have to make sure the file is available on the net.
You could upload it to http://yourdomain.com/myprofile.uwp, the only thing that's important is, that it's available via http.

If the file is uploaded and available, you are able to use it with webmail.
While viewing the login page, click on "Use external profile?" and paste the URL in the appearing input field.