-
- /*
- * A patch from Bill Thousand <billyt@claritytech.com>
- *
- * "I don't know if anyone else needs this or not, but it totally makes squirrelmail usable for us.
- * This quick patch checks the username and from address for the domain information. We use
- * a virtual domain patch for our imap server that allows multiple domains by using username@domain.com
- * as the login username."
- */
- if ($from_addr == "") {
- if (strstr($username, "@")) {
- $from_addr = $username;
- $address_pieces = explode("@",$username);
- $domain = $address_pieces[1];
- } else {
- $from_addr = "$username@$domain";
- }
- } else {
- // If the From Address is specified, use the domain in the from
- // address if it's there.
- if (strstr($from_addr, "@")) {
- $address_pieces = explode("@", $from_addr);
- $domain = $address_pieces[1];
- }
- }
- /*
- * End patch from Bill Thousand
- */
-