Java Reference
In-Depth Information
while (inputStream.available()>0)
answer.append(ch # ( char );
// check if the buffer contains a full reply..
if (readAnswer && ch ## '\n'){
String res # answer.toString();
if (res.endsWith("OK\r\n") ||
res.endsWith("ERROR\r\n") ||
res.indexOf(" ! CME ERROR: ")>(res.length()-20) ||
res.indexOf(" ! CMS ERROR: ")>(res.length()-20) ){
// ..wake up sendCmdNoCR if a full reply is
// present
readAnswer # false ;
} catch (IOException e) {}
break ;
To test the notification we need to connect a mobile phone to the computer
via a serial connection. Then we have to set up a profile with a valid mobile
number and with the SMS notification enabled. At this point, sending an
email message to the user should trigger the sending of an SMS message. The
delay between the sending of the email and reception of the notification is
given by the sum of three delays: delay of reception by the mail server,
sampling interval of the notifier and delay of SMS delivery from the GSM
The reader can extend the UbiMail system in several ways:
Improve the notification filter. Currently the system checks if either the
sender or the subject contains a given string. This mechanism could be
extended, defining multiple criteria to create more flexibility. In addition,
criteria could be used to approve or to reject the notification of a message.
Finally, regular expressions could be used to obtain better message
Improve the presentation of messages. Currently only text and HTML
parts of messages are shown. It should be possible to handle the other
formats of multipart messages; this includes attachments that the system
should allow to be downloaded.
Search WWH ::

Custom Search