[git] GpgOL - branch, master, updated. gpgol-1.2.0-4-gaeec79a
by Andre Heinecke
cvs at cvs.gnupg.org
Fri Jul 25 17:09:58 CEST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG extension for MS Outlook".
The branch, master has been updated
via aeec79a154f4fcc5348c0dafe1742278fb2e4a62 (commit)
from 5fd4e5723a8a25576b87c35b228ea596e1dee554 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit aeec79a154f4fcc5348c0dafe1742278fb2e4a62
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Fri Jul 25 17:07:07 2014 +0200
Add fallback for sender email
In case the sender email addess is not an smtp address fall
back to the property accessor.
* src/ribbon-callbacks.cpp (do_reader_action): Use property
accessor for non smtp addresses.
--
Here the property accessor returned an unknown property error
when the sender address was smtp. But according to documentation
the Sender object should have that property for internal exchange
senders.
This also just omits the sender from the verify call (as
get_pa_string returns NULL on error) if the sender address is
not smtp and can not be obtained with the property.
diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index e9b7e27..eef0b2a 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -684,7 +684,19 @@ do_reader_action (LPDISPATCH ctrl, int flags)
subject = get_oom_string (mailItem, "Subject");
if (get_oom_bool (mailItem, "Sent"))
{
- senderAddr = get_oom_string (mailItem, "SenderEmailAddress");
+ char *addrType = get_oom_string (mailItem, "SenderEmailType");
+ if (addrType && strcmp("SMTP", addrType) == 0)
+ {
+ senderAddr = get_oom_string (mailItem, "SenderEmailAddress");
+ }
+ else
+ {
+ /* Not SMTP, fall back to try getting the property. */
+ LPDISPATCH sender = get_oom_object (mailItem, "Sender");
+ senderAddr = get_pa_string (sender, PR_SMTP_ADDRESS);
+ RELDISP (sender);
+ }
+ xfree (addrType);
}
else
{
-----------------------------------------------------------------------
Summary of changes:
src/ribbon-callbacks.cpp | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
hooks/post-receive
--
GnuPG extension for MS Outlook
http://git.gnupg.org
More information about the Gnupg-commits
mailing list