Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…alendarSync into release

Fixes #1126
  • Loading branch information
phw198 committed Dec 2, 2020
2 parents 58807d6 + e98e3a5 commit e322774
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookNew.cs
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,14 @@ public String GetRecipientEmail(Recipient recipient) {
ExchangeUser eu = null;
try {
eu = addressEntry.GetExchangeUser();
if (eu != null && eu.PrimarySmtpAddress != null)
retEmail = eu.PrimarySmtpAddress;
else {
if (eu != null) {
try {
retEmail = eu.PrimarySmtpAddress;
} catch (System.Exception ex) {
OGCSexception.Analyse("Could not access Exchange users's primary SMTP.", OGCSexception.LogAsFail(ex));
}
}
if (eu == null || string.IsNullOrEmpty(retEmail)) {
log.Warn("Exchange does not have an email for recipient: " + recipient.Name);
Microsoft.Office.Interop.Outlook.PropertyAccessor pa = null;
try {
Expand Down Expand Up @@ -800,7 +805,7 @@ private TimeZoneInfo getWindowsTimezoneFromDescription(String tzDescription) {
if (tzi != null) return tzi;

//Finally, fuzzy logic
log.Warn("Could not find timezone ID based on given description. Attempting some fuzzy logic...");
log.Warn("Could not find timezone ID based on given description, '" + tzDescription + "'. Attempting some fuzzy logic...");
if (tzDescription.StartsWith("(GMT")) {
log.Fine("Replace GMT with UTC");
String modTzDescription = tzDescription.Replace("(GMT", "(UTC");
Expand Down

0 comments on commit e322774

Please sign in to comment.