In these days of big noise on mobility, I thought it would be a good idea to be able to receive SMS notification (at no cost...!!) of incoming e-mails (sender, subject) on my mobile phone. I'm quite often out of the office and able to retrieve my e-mail by Notes replication, browser and e-mail reader, but I wanted to actually get immediate SMS notification of sender and subject on my cell phone for prompt action, if required.
So first of all I activated a free mailbox service available from my GSM provider. This allows SMS notification of e-mails (quite common these days) In other words all e-mails arriving at "firstname.lastname@example.org" are notified by an SMS displaying sender and subject (for free!).
Then I wrote a simple Notes agent, similar to the famous "Out of the Office" one, that is simply generating a new e-mail with proper From/Subject/To/Body fields This agent obviously has to run when new e-mail arrives.
Tip: I enabled a filter on the SMS notification service to notify ONLY emails containing "XYZ" in the subject. My agent appends to the new e-mail's subject an "XYZ" suffix, in this way I'm sure I will be notified only of e-mail coming from the office and not spam arriving directly in my GSM provider mailbox.
Note: more complex logic can be used in the agent to take proper action in case of particular senders or urgent e-mails, etc... Also, watch out for "Non Delivery Report" e-mails that might send your agent in an endless loop!!! Last but not least, a better user interface can be given for agent configuration (i.e. GSM address to use, etc.) like the "Out of the Office" agent activation and configuration interface.
Have fun and contact me if you need more info!
Domino Telecom Solutions
Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim collection As NotesDocumentCollection Dim doc As NotesDocument Dim sms As NotesDocument Dim i As Integer Set db = session.CurrentDatabase Set collection = db.UnprocessedDocuments For i = 1 To collection.Count Set doc = collection.GetNthDocument( i ) Call session.UpdateProcessedDoc( doc ) If doc.Form(0) = "Memo" Or doc.Form(0) = "Reply" Then Set sms = New NotesDocument( db ) sms.Form = "Memo" If doc.From(0) Like "*@*" Then sms.INetFrom = doc.From(0) Elseif doc.INetFrom(0) Like "*@*" Then sms.INetFrom = doc.INetFrom(0) Else 'if there is no valid internet address, I set myself as return address sms.INetFrom = "email@example.com" End If sms.Subject = doc.Subject(0) + " XYZ" 'my SMS notification does not provide the body so... sms.Body = "Cool!" Call sms.Send( False, "firstname.lastname@example.org" ) End If Next End Sub