projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clean up code commented out since 8 y
[squirrelmail.git]
/
functions
/
identity.php
diff --git
a/functions/identity.php
b/functions/identity.php
index 79576ab84807ee02b92cedf47990c858a6875256..16760dab48589bbbfe8757bce372788828c3991e 100644
(file)
--- a/
functions/identity.php
+++ b/
functions/identity.php
@@
-5,7
+5,7
@@
*
* This contains utility functions for dealing with multiple identities
*
*
* This contains utility functions for dealing with multiple identities
*
- * @copyright
© 1999-2007
The SquirrelMail Project Team
+ * @copyright
1999-2012
The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
@@
-225,6
+225,9
@@
function empty_identity($ident) {
* @since 1.5.2
*/
function build_from_header($identity = 0) {
* @since 1.5.2
*/
function build_from_header($identity = 0) {
+
+ global $domain;
+
$idents = get_identities();
if (! isset($idents[$identity]) ) $identity = 0;
$idents = get_identities();
if (! isset($idents[$identity]) ) $identity = 0;
@@
-234,13
+237,15
@@
function build_from_header($identity = 0) {
}
$from_mail = $idents[$identity]['email_address'];
}
$from_mail = $idents[$identity]['email_address'];
+ if (strpos($from_mail, '@') === FALSE)
+ $from_mail .= '@' . $domain;
if ( isset($from_name) ) {
if ( isset($from_name) ) {
- $from_name_encoded = encodeHeader(
$from_name
);
+ $from_name_encoded = encodeHeader(
'"' . $from_name . '"'
);
if ($from_name_encoded != $from_name) {
if ($from_name_encoded != $from_name) {
- return $from_name_encoded .
' <'.$from_mail.
'>';
+ return $from_name_encoded .
' <' . $from_mail .
'>';
}
}
- return '"'
.$from_name .'" <'.$from_mail.
'>';
+ return '"'
. $from_name . '" <' . $from_mail .
'>';
}
return $from_mail;
}
}
return $from_mail;
}