Home > Domino Tips > True Domino Bloopers > True Domino Blooper #3: Return to sender
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

TRUE DOMINO BLOOPERS

True Domino Blooper #3: Return to sender


Kara Gattine
07.09.2002
Rating: --- (out of 5)


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


This Lotus developer was trying to come up with a clever solution to forward incoming e-mails to recipients' text-enabled mobile phones. Instead he ended up setting off a mail bomb on himself and his ASP. The following story is a good example of how a clever idea can blow up in your face, or your inbox.

I was doing some development work to create an agent that would run when a new mail arrives and send a summary to the mobile phone text service (SMS). I had set the agent to run on new mail received but for each mail received it sent summaries of all e-mails in my DB!

Anyway the poor ASP that was forwarding my SMSs had a limit of 100 per day so any subsequent SMS was rejected with an e-mail, which in turn triggered another flood of e-mails, which in turn resulted in a stream of rejections, which in turn... well you get the picture.

I left this running overnight!

The result: Some 40,000 e-mails outbound with a similar number inbound and a very cranky ASP. I was very red-faced the next morning to return to the office with a lot of phone messages from ASP. It was an easy fix, but now I have lifetime ban from the ASP. I have fixed the agent (below), which looks in the calendar profile for details of SMS e-mail addresses. The agent is set to run "AfterNew mail Has Arrived" on newly received mail documents.

Regards,
George Savory

Code

'Options
Option Public
Option Declare

Sub Initialize
     Dim session As New NotesSession
     Dim dbCurrent As NotesDatabase
     Dim collUnprocessed As NotesDocumentCollection
     Dim docCurrent As NotesDocument
     Dim itemBody As NotesItem
     Dim strPriority As String, strImportance As String
     Dim varBody As Variant
     Dim strSendTo As String
     Dim m_calprofile As notesdocument
     Dim sendsms As String



     Set dbCurrent = session.CurrentDatabase
     Set m_calprofile = dbCurrent.GetProfileDocument("CalendarProfile")
     strSendTo = M_calprofile.SMSAddress(0)       'Celluar pager address
     sendsms = M_calprofile.SMSOwner(0)

     If sendsms = "Yes" Then 'I want to be notified
          If (dbCurrent Is Nothing) Then
               'Nothing to Process
          Else
               Set collUnprocessed = dbCurrent.UnprocessedDocuments
               If collUnprocessed.Count < 1 Then
               Else
                    Set docCurrent = collUnprocessed.GetFirstDocument
                    If (docCurrent Is Nothing) Then
                         'No handle for Current Doc
                    Else
                         Do
                              strPriority = docCurrent.DeliveryPriority(0)
                              strImportance = docCurrent.Importance(0)
                              If ((docCurrent.Form(0) = "Memo") And
(strPriority = "H" Or strImportance = "1")) Then
                             'Need to create new memo & send to pager.
                                   Dim docPagerMemo As New
NotesDocument(dbCurrent)
                                   Dim varFrom As Variant, strSubject As
String, strBodyText As String
                                   docPagerMemo.SendTo = strSendTo
                                   varFrom = Evaluate({@Name([CN]; From)},
docCurrent)
                                   strSubject = docCurrent.Subject(0)
                                   Set itemBody = docCurrent.GetFirstItem
("Body")
                                   If (itemBody Is Nothing) Then
                                   'Body can not be read
                                         docPagerMemo.Body = "Text can not
be read. Check your email. | From: " & varFrom
                                   Else
                                   'If Body can be read, return only 200
characters
                                         strBodyText = "Fr: " & varFrom(0)
& " : "  & Left(itemBody.Abstract(1000,1,0), 200)
                                         docPagerMemo.Subject = strSubject
                                         docPagerMemo.Body = strBodyText
                                         docpagermemo.inetfrom
= "b2b<b ((Content component not found.)) .b>"
                                   End If
                                   Call docPagerMemo.Send(False)
                                   Call
session.UpdateProcessedDoc(docCurrent)
                              End If
                              Set docCurrent =
collUnprocessed.GetNextDocument(docCurrent)
                         Loop Until (docCurrent Is Nothing)
                    End If
               End If
          End If
     Else
          'No I dont want to be notified
          Exit Sub
     End If
End Sub
'End of Agent


Do you have your own blooper? Send it in and claim your fame.

Every story in our bloopers series comes to us directly from a SearchDomino.com administrator, developer or consultant. For obvious reasons, some contributors -- including this tale's author -- choose to remain anonymous.

MORE ON THIS TOPIC:

Read all SearchDomino.com's true bloopers.
View our Best Web Links on Domino/Notes administration.

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.




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



RELATED CONTENT
True Domino Bloopers
True Domino Blooper #29: Agent OOPS
True Domino Blooper #28: The Super Server Upgrade
True Domino Blooper #27: Blame it on Domino
True Domino Blooper #1: The Out-Of-Office nightmare
True Domino Blooper #2: Independence Day blunder
True Domino Blooper #4: Extended directories or bust!
True Domino Blooper #5: I'm not a Notes expert, but I play one on TV
True Domino Blooper #7: AdminP worm unleashed
True Domino Blooper #8: With vacations like this, who needs work?
True Domino Blooper #9: Don't judge an address book by its cover

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