-/*
- * Identity support (RFC 2369 sect. B.1.)
- *
- * I had to copy this from compose.php because there doesn't
- * seem to exist a function to get the identities.
- */
-
-$defaultmail = htmlspecialchars(getPref($data_dir, $username, 'full_name'));
-$em = getPref($data_dir, $username, 'email_address');
-if ($em != '') {
- $defaultmail .= htmlspecialchars(' <' . $em . '>') . "\n";
-}
-echo html_tag('p', '', 'center' ) . _("From:") . ' ';
-
-$idents = getPref($data_dir, $username, 'identities');
-if ($idents != '' && $idents > 1) {
- echo ' <select name="identity">' . "\n" .
- '<option value="default">' . $defaultmail;
- for ($i = 1; $i < $idents; $i ++) {
- echo '<option value="' . $i . '"';
- if (isset($identity) && $identity == $i) {
- echo ' selected';
- }
- echo '>' . htmlspecialchars(getPref($data_dir, $username,
- 'full_name' . $i));
- $em = getPref($data_dir, $username, 'email_address' . $i);
- if ($em != '') {
- echo htmlspecialchars(' <' . $em . '>') . "\n";
- }
- }
- echo '</select>' . "\n" ;
-
-} else {
- echo $defaultmail;
-}