/ Forums / Advansys Formativ / Creating Solutions with Formativ / example of the GroupWise.SendMail method

  • Creator
    Topic
  • #4357
    MikeC
    Participant

      I am trying to understand the GroupWise.SendMail. With all of the parameters needed for this line of code I am not sure what is needed for each parameter. If some more descriptive meaning to these parameters and an example could be given, it would be greatly appreciated. If there is a URL that gives better descriptions for methods, that would also be helpful. Thanks

    • Author
      Replies
    • #7926
      Support 3
      Participant

        GroupWise.SendMail() is Formativ Wrapper around GroupWise Token API. See below the URL for the GroupWise Token API documentation.
        http://developer.novell.com/documentation/gwtoken/index.html?gwtokens/data/hj8ej8g5.html

        Note that most of the parameters of the SendMail() are optional, so you can also call the GroupWise.SendMail() with only required parameters.

        Regards,
        Advansys Support

        #7923
        MikeC
        Participant

          Thanks very much for your response. I have been able to get this working and all works as I would assume it should.

          I have moved on from this back to using the Object API and creating a mail through GroupWise.Account.MailBox.Messages.Add
          Is there an easy quick way to add a string list to the body of the email without having to step through each string list item and add it to the body, the code I am using is:

          for i = 0 to strtmp.Count – 1
          newMail.BodyText = newMail.BodyText + strlist.Strings(i)
          next

          The problem is with a large string list it takes a long time to fill in the BodyText because it is also reading in itself (BodyText) each time.

          Any information to clarify this issue will be greatly appreciated.

          #7925
          Support 1
          Participant

            The available properties of StringList are listed in the Formativ Language Guide, under Utilities.

            I suggest using the Text property to append your string list, as in:

              newMail.BodyText = newMail.BodyText & strList.Text

            If you need to append more than one ‘chunk’ (or section) of text to BodyText, it is probably more efficient to progressively append the chunks to a string list (eg. strlist.Add). Then assign the resulting string list to BodyText:

              strList.Add("Mary had a little lamb")
              strList.Add("whose fleece was white as snow.")
              newMail.BodyText = strList.Text

            I hope this helps.

            Regards,
            Advansys Support

            #7924
            MikeC
            Participant

              The quick response is greatly appreciated and has been a great help.

              All working wonderfully quickly now.

              #7922
              Support 3
              Participant

                Thanks for your feedback.

                Regards,
                Advansys Support

              Viewing 5 replies - 1 through 5 (of 5 total)
              • You must be logged in to reply to this topic.