+/* Figure out what the 'From:' address is
+ */
+
+function getFrom() {
+ global $username, $popuser, $domain, $data_dir, $identity;
+ if (isset($identity) && $identity != 'default') {
+ $from_addr = getPref($data_dir, $username,
+ 'email_address' . $identity);
+ }
+ else {
+ $from_addr = getPref($data_dir, $username, 'email_address');
+ }
+
+ if (!$from_addr) {
+ $from_addr = "$popuser@$domain";
+ }
+ return $from_addr;
+}
+