***UNCHECKED*** [Tickets #14988] Re: ActiveSync mail setting From: header
noreply at bugs.horde.org
noreply at bugs.horde.org
Wed Jun 3 20:12:56 UTC 2020
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: https://bugs.horde.org/ticket/14988
------------------------------------------------------------------------------
Ticket | 14988
Updated By | 2020 at ichbinweg.ch
Summary | ActiveSync mail setting From: header
Queue | Synchronization
Version | FRAMEWORK_5_2
Type | Bug
State | Feedback
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
2020 at ichbinweg.ch (2020-06-03 20:12) wrote:
> Does the "Default Identity" entry have a "The default e-mail address
> to use with this identity:" value set?
>
> Other things to try:
> Use the administrative sql shell and execute:
>
> SELECT * FROM horde_prefs WHERE pref_name='activesync_identity';
>
> If you have something other than "use horde default" set in the
> prefs, this will be some number. Probably '0' for the original
> default identity.
>
>
> Then, in the administrative PHP shell:
>
> ident =
> $injector->getInstance('Horde_Core_Factory_Identity')->create('your_username_here');
> var_dump($ident->getValue('from_addr', x); // replace 'x' with the
> number returned from the query above.
>
> This should output the email address that activesync will use as the
> From address of outgoing email.
Yes, the default identity has an e-mail address set.
SELECT * FROM horde_prefs WHERE pref_name='activesync_identity';
in the SQL Shell delivers:
pref_uid pref_scope pref_name pref_value
<username> horde activesync_identity 0
$ident=$injector->getInstance('Horde_Core_Factory_Identity')->create('<username>');
var_dump($ident->getValue('from_addr',0));
in the PHP shell correctly delivers the e-mail address set for the
default identity. Still, this address is not set in the "From" header
when sending messages via ActiveSync. Here an excerpt from
Core/ActiveSync/Mail.php:
public function setRawMessage(Horde_ActiveSync_Rfc822 $raw)
{
$this->_headers = $raw->getHeaders();
// Attempt to always use the identity's From address, but fall back
// to the device's sent value if it's not present.
if ($from = $this->_getIdentityFromAddress()) {
$this->_headers->removeHeader('From');
$this->_headers->addHeader('From', $from);
}
// Reply-To?
if ($replyto = $this->_getReplyToAddress()) {
$this->_headers->addHeader('Reply-To', $replyto);
}
$this->_raw = $raw;
}
The first "if" seems to fail so the "From" header is not removed and
set to the default identity. How can I debug that one? Thanks for any
help.
More information about the bugs
mailing list