/ Forums / Advansys Formativ / Creating Solutions with Formativ / Opening a portal for custom mail messages / Reply To: Opening a portal for custom mail messages

Support 1a

    I’ve just created a couple of simple example applets, and are unable to reproduce the problem you describe.

    Here’s my code that sends myself an email message of the custom message class GW.MESSAGE.MAIL.EMPPROC:

    Sub Main(Client, GWEvent)
      dim objDraft
      dim objEmail
      dim objRecipient
      set objDraft = GroupWise.Account.MailBox.Messages.Add("GW.MESSAGE.MAIL.EMPPROC", 4)
      objRecipient = objDraft.Recipients.Add(objDraft.Sender.EmailAddress,,0)
      objDraft.Subject = "This is a custom message of class GW.MESSAGE.MAIL.EMPPROCs"
      objDraft.BodyText.PlainText = "This is the body text of the email message"
      set objEmail = objDraft.Send
    End Sub

    Running this results in a new email message appearing in my mailbox.

    I then create a new applet in which I defined a new message class of GW.MESSAGE.MAIL.EMPPROC, and defined an integration against the GW.MESSAGE.MAIL.EMPPROC OnOpen event. I indicated that I wanted to replace the GroupWise event. Here’s the very simple applet code that is executed when the GW.MESSAGE.MAIL.EMPPROC OnOpen event is triggered:

    Sub Main(Client, GWEvent)
      if GWEvent = "GW#C#OPEN" then
        MsgBox "Display the portal"
      end if
    End Sub

    When I open any ‘standard’ email message, the message box is not displayed (in fact, the applet isn’t executed as it’s integrated against the custom message class). When I open the message I created with first example applet shown above, the message box is displayed.

    I don’t know why you would see your applet being executed when you open a standard email message – you might want to re-check your integrations. You could also email a copy of your configuration information to support@advansyscorp.com and we’ll take a look. From GroupWise, select Help|About Formativ. When the about dialog appears, select the configuration tab, then press the copy to clipboard button. Paste the contents of the clipboard into an email message to the above address.

    Advansys Support