Hi Peter
the following was called after my form init : the goal is to find if a certain (registration) sms was recieved:
OLS = new OutlookSession();
foreach (SmsMessage sms in OLS.SmsAccount.Inbox)
{
//this if is my current workaround in bold. the code even finds the required message, but...
//had to add this after the version change
//otherwise i'd get an unhandled NullReferenceException on accessing the sms instance...
//i agree this is healthier anyway, but it just leads me to wonder what other
//things i'm missing....
if (sms == null)
{
continue;
}
if (sms.From.Address.CompareTo("**knownNumber**") == 0 || sms.From.Address.CompareTo("**+knownNumber**") == 0 || sms.From.Name.CompareTo("**anotherKnownNumber**") == 0)
{
string body = sms.Body.Trim();
string key = "predefined info ";
//....
//do some annoying string parsing
//...
CommitUserSettings();
break;
}
} //end of foreach
thanks a lot
Aviv