It's not that simple. Device status is technically an integer. What you want to do is change a particular device status integer's associated string to the first sentence from an email. Determining the FROM person or address is relatively easy, as we are given that fromthe email and can just check it.
The first major issue is determining what that sentence is. Is the email HTML mail? If so, you may have to strip the HTML from the text (bunch of replace functions as in the example code).
Can we assume the sender will always use correct punctuation? If so, what punctuation will be used to end the first sentence? Usually, a period, question mark, exclamation mark can easily be sentence endings. So, how do we know which is in use? If we don't then we have to crawl the sentence text until we find one of them. The SPLIT function can do this for us, if properly coded. You could also locate where all the punctuation is in the body text, and pick the lowest location value and assume that is the end of the first sentence, then take the substring of the body text up to that point.
From there you need to pick a status value, then change the string associated with it in the device values strings. In a normal X10 device, those values are 2=ON, 3=OFF, 4=DIM and 17=UKNOWN.
This last part would be easier if it was just the device string you wanted to change, but getting the first sentence is still the biggest issue.