From 0b1dddbae9e9bbfe68da1b97ebb3affd042f1a41 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Wed, 9 Jul 2008 19:25:40 +0000 Subject: [PATCH] Guarantee outgoing addresses have a domain part git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13224 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/identity.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions/identity.php b/functions/identity.php index 79576ab8..4f80b0a4 100644 --- a/functions/identity.php +++ b/functions/identity.php @@ -225,6 +225,9 @@ function empty_identity($ident) { * @since 1.5.2 */ function build_from_header($identity = 0) { + + global $domain; + $idents = get_identities(); if (! isset($idents[$identity]) ) $identity = 0; @@ -234,6 +237,8 @@ function build_from_header($identity = 0) { } $from_mail = $idents[$identity]['email_address']; + if (strpos($from_mail, '@') === FALSE) + $from_mail .= '@' . $domain; if ( isset($from_name) ) { $from_name_encoded = encodeHeader($from_name); -- 2.25.1