Home > Domino Tips > Developer > Agent > Free SMS notification of emails
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

AGENT

Free SMS notification of emails


Romano Arnaldi
10.07.2002
Rating: -2.62- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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 "mycellphone@mygsmprovider.com" 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!

Romano Arnaldi
Domino Telecom Solutions
http://www.dominotel.com
mailto:romano@dominotel.com



Code

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 = "myemail@mycompany.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, "mycellphone@mygsmprovider.com" )
      End If
Next

End Sub

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Agent
Run or restart Notes/Domino agents via text messages
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
How to export data from a Lotus Notes database to a CSV file
Enable or disable scheduled agents without opening the Lotus Notes database design
Creating custom views in Lotus Notes databases
Editing fields in a Lotus Notes view with Ajax

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts