diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 04562a11d0..07e44c47ed 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -2285,7 +2285,9 @@ class mail_compose { error_log(__METHOD__.__LINE__.' Faking From/SenderInfo for '.$activeMailProfile['ident_email'].' with ID:'.$activeMailProfile['ident_id'].'. Identitiy to use for sending:'.array2string($_identity)); } - $_mailObject->setFrom($_identity['ident_email'] ? $_identity['ident_email'] : $activeMailProfile['ident_email'], + $email_From = $_identity['ident_email'] ? $_identity['ident_email'] : $activeMailProfile['ident_email']; + // Try to fix identity email with no domain part set + $_mailObject->setFrom(Mail::fixInvalidAliasAddress(Api\Accounts::id2name($_identity['account_id'], 'account_email'), $email_From), Mail::generateIdentityString($_identity,false)); $_mailObject->addHeader('X-Priority', $_formData['priority']);