Version 1.1.0 -- DEVELOPMENT
----------------------------
+- If aliases are typed in To, Cc, or Bcc, they are automatically lookedup in
+ in the addressbook and converted to the associated addresses.
- Added collapseable folder listing (an option that can be turned on)
- Added alternating row colors to improve interface
- Added Croatian translation by Albert Novak <anovak@pu.carnet.hr>
**/
$smtp_php = true;
+ if (!isset($addressbook_php))
+ include('../functions/addressbook.php');
// This should most probably go to some initialization...
if (ereg("^([^@%/]+)[@%/](.+)$", $username, $usernamedata)) {
return false;
}
+ // looks up aliases in the addressbook and expands them to
+ // the full address.
+ function expandAddrs ($array) {
+ $abook = addressbook_init();
+ for ($i=0; $i < count($array); $i++) {
+ $result = $abook->lookup($array[$i]);
+ $ret = "";
+ if (isset($result['email'])) {
+ if (isset($result['name'])) {
+ $ret = '"'.$result['name'].'" ';
+ }
+ $ret .= '<'.$result['email'].'>';
+ $array[$i] = $ret;
+ }
+ }
+ return $array;
+ }
+
// Attach the files that are due to be attached
function attachFiles ($fp) {
global $attachments, $attachment_dir;
static $header, $headerlength;
if ($header == '') {
- $to = parseAddrs($t);
- $cc = parseAddrs($c);
- $bcc = parseAddrs($b);
+ $to = expandAddrs(parseAddrs($t));
+ $cc = expandAddrs(parseAddrs($c));
+ $bcc = expandAddrs(parseAddrs($b));
$reply_to = getPref($data_dir, $username, 'reply_to');
$from = getPref($data_dir, $username, 'full_name');
$from_addr = getPref($data_dir, $username, 'email_address');
global $username, $popuser, $domain, $version, $smtpServerAddress, $smtpPort,
$data_dir, $color;
- $to = parseAddrs($t);
- $cc = parseAddrs($c);
- $bcc = parseAddrs($b);
+ $to = expandAddrs(parseAddrs($t));
+ $cc = expandAddrs(parseAddrs($c));
+ $bcc = expandAddrs(parseAddrs($b));
$from_addr = getPref($data_dir, $username, 'email_address');
if (!$from_addr)