none
Account.SmtpAddress returns "SMTP:" on Outlook 15.0.4551.1005 RRS feed

  • Question

  • Hi everybody,

    on friday our company received the latest outlook update to version 15.0.4551.1005, which is related to Lync, as described here: http://support.microsoft.com/kb/2825630/en-us

    Now our add-in stopped to correctly retreive the email addresses of an account, if the account is an exchange account. This behaviour was not limited to a single computer but all in our company running outlook 2013.

    We found a workaround, which we will roll out as hotfix, but it would be nice to know, how this can be possible, or if this issue is also related to a specific exchange setting.

    Here is a code snippet in C#:

    // Before there was no Contains("@"), just the NullOrEmpty check
    if (!string.IsNullOrEmpty(account.SmtpAddress) && account.SmtpAddress.Contains("@"))
    	return account.SmtpAddress; // returned "SMTP:" after the update
    
    Recipient r = null;
    try
    {
    	r = account.CurrentUser;
    	if (r != null && !string.IsNullOrEmpty(r.Address) && r.Address.Contains("@"))
    		return r.Address; // works nearly everytime
    
    	// and there is another check to retreive the smtp address, but this is to complicated to post now.
    }
    finally
    {
    	if (r != null)
    		Marshal.ReleaseComObject(r);
    }
    

    Can someone confirm this as bug - I would assume, that it should not be necessary to check the return value of Account.SmtpAddress to be a valid email address :(

    Monday, November 18, 2013 1:03 PM

Answers

  • http://support.microsoft.com/kb/2850061

    It's fixed now with update 15.0.4551.1512

    Thanks Microsoft :)

    • Marked as answer by Ranfty2000 Monday, January 20, 2014 8:45 AM
    Monday, January 20, 2014 8:45 AM

All replies

  • That sure sounds like a bug - I bet Outlook uses the PR_EMS_AB_PROXY_ADDRESSES MAPI property, which prefixes all available addresses with the address type. The default SMTP address is prefixed with "SMTP:" (upper case).

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, November 18, 2013 1:58 PM
  • Hi everybody,

    on friday our company received the latest outlook update to version 15.0.4551.1005, which is related to Lync, as described here: http://support.microsoft.com/kb/2825630/en-us

    NoHello,  our add-in stopped to correctly retreive the email addresses of an account, if the account is an exchange account. This behaviour was not limited to a single computer but all in our company running outlook 2013.

    We found a workaround, which we will roll out as hotfix, but it would be nice to know, how this can be possible, or if this issue is also related to a specific exchange setting.

    Here is a code snippet in C#:

    // Before there was no Contains("@"), just the NullOrEmpty check
    if (!string.IsNullOrEmpty(account.SmtpAddress) && account.SmtpAddress.Contains("@"))
    	return account.SmtpAddress; // returned "SMTP:" after the update
    
    Recipient r = null;
    try
    {
    	r = account.CurrentUser;
    	if (r != null && !string.IsNullOrEmpty(r.Address) && r.Address.Contains("@"))
    		return r.Address; // works nearly everytime
    
    	// and there is another check to retreive the smtp address, but this is to complicated to post now.
    }
    finally
    {
    	if (r != null)
    		Marshal.ReleaseComObject(r);
    }

    Can someone confirm this as bug - I would assume, that it should not be necessary to check the return value of Account.SmtpAddress to be a valid email address :(

    Hello,

    I have the same problem.

    I said to my customers to cancel this update.

    Tuesday, November 19, 2013 11:53 AM
  • Is the returned value only "SMTP:" or is there an actual email address after that text?

    Ken Slovak MVP - Outlook

    Tuesday, November 19, 2013 3:26 PM
    Moderator
  • Is the returned value only "SMTP:" or is there an actual email address after that text?

    Ken Slovak MVP - Outlook

    only "SMTP:", no email address.

    PS: The other ways are working.

    Tuesday, November 19, 2013 3:30 PM
  • Thanks. I notified the Outlook product group.

    Ken Slovak MVP - Outlook

    Tuesday, November 19, 2013 3:48 PM
    Moderator
  • Hey guys, have you heard any feedback from Microsoft on this issue?  We just ran into it as well.
    Friday, January 10, 2014 5:04 PM
  • So far only to not install the affected update. It should be fixed in a rollup or in Office 2013 SP1 when it's released.

    Ken Slovak MVP - Outlook

    Friday, January 10, 2014 5:12 PM
    Moderator
  • http://support.microsoft.com/kb/2850061

    It's fixed now with update 15.0.4551.1512

    Thanks Microsoft :)

    • Marked as answer by Ranfty2000 Monday, January 20, 2014 8:45 AM
    Monday, January 20, 2014 8:45 AM