• Novell’s Groupwise Email (Access97)

    Author
    Topic
    #399168

    With the code below I am able to send a single email from Access through Novell’s Groupwise. If I want to send the same email to multiple addressees I can either duplicate the following line –
    .Recipients.Add Addressee@Addressee.com – for the number of addressees that I have or I can loop through a recordset and send each addressee an email.

    I have looked at several examples of sending emails with Groupwise, including the code Charlotte provided and code from Dev Ashish’s site.

    What I would like to know is, when you don’t know how many addressees are going to be used, is there a way to send one email with multiple addressees?

    With New GroupwareTypeLibrary.Application

    With .Login
    With .MailBox.Messages.Add(Class:=”GW.MESSAGE.MAIL”)
    .Subject.PlainText = “Subject of Email”
    .BodyText.PlainText = “Body of the Email”
    .Recipients.Add “Addressee@Addressee.com”
    .Recipients.Resolve
    .Send
    End With
    End With

    .Quit
    End With

    Thanks

    Viewing 3 reply threads
    Author
    Replies
    • #768966

      [indent]


      when you don’t know how many addressees are going to be used, is there a way to send one email with multiple addressees?


      [/indent] I don’t understand this at all. Where are you getting the addresses if you don’t know how many there are?? confused

      • #769279

        The user has a table where they can add or delete email addresses at will. They do not have access to the code to add additional lines of – .Recipients.Add Addressee@Addressee.com – for each email address to appear in the TO: field of the email.

        I hope this is clearer.

        Thanks

        • #769289

          In that case, you can open a recordset on that table and you’ll know what you’re dealing with. All you need to is add a loop to step through the recordset until you reach .EOF and add each address.

          • #769298

            I must not be making myself clear.

            In my original post I did say that I could loop through a recordset and send each addressee the email. 20 recipients = 20 different emails.

            What I am looking for is code that will allow me to send [one email only] addressed to all recipients.

            Thanks

            • #769311

              Charlotte indicated what you have to do for that. Say that you have declared and opened a recordset rst with a field Email.


              Do While Not rst.EOF
              .Recipients.Add rst!Email
              rst.MoveNext
              Loop
              .Recipients.Resolve
              .Send

              So you don’t send within the loop, you only add recipients within the loop, then send.

            • #769326

              Hans,

              Did the loop work for you? I tried the loop you posted and Groupwise only sent the email to the last addressee in the recordset.

              Trying to create a string variable with all email addresses delimited with a ; didn’t work either.

              Thanks

            • #769338

              To be honest, I extrapolated from the way Outlook works. I don’t use Groupwise myself.

              Does the following work? I found similar bits of code in the newsgroups:

              Dim gwRecipient As (whatever the recipient object in Groupwise is)

              Do While Not rst.EOF
              Set gwRecipient = .Recipients.Add
              gwRecipient.Name = rst!Email
              gwRecipient.Resolve
              rst.MoveNext
              Loop

              If this does not work either, I apologize for the confusion, but I can’t help. Sorry.

            • #769358

              Thanks Hans.

              I always appreciate the efforts of everyone who tries to help.

              Thanks again.

            • #769359

              Thanks Hans.

              I always appreciate the efforts of everyone who tries to help.

              Thanks again.

            • #769339

              To be honest, I extrapolated from the way Outlook works. I don’t use Groupwise myself.

              Does the following work? I found similar bits of code in the newsgroups:

              Dim gwRecipient As (whatever the recipient object in Groupwise is)

              Do While Not rst.EOF
              Set gwRecipient = .Recipients.Add
              gwRecipient.Name = rst!Email
              gwRecipient.Resolve
              rst.MoveNext
              Loop

              If this does not work either, I apologize for the confusion, but I can’t help. Sorry.

            • #769327

              Hans,

              Did the loop work for you? I tried the loop you posted and Groupwise only sent the email to the last addressee in the recordset.

              Trying to create a string variable with all email addresses delimited with a ; didn’t work either.

              Thanks

            • #769312

              Charlotte indicated what you have to do for that. Say that you have declared and opened a recordset rst with a field Email.


              Do While Not rst.EOF
              .Recipients.Add rst!Email
              rst.MoveNext
              Loop
              .Recipients.Resolve
              .Send

              So you don’t send within the loop, you only add recipients within the loop, then send.

          • #769299

            I must not be making myself clear.

            In my original post I did say that I could loop through a recordset and send each addressee the email. 20 recipients = 20 different emails.

            What I am looking for is code that will allow me to send [one email only] addressed to all recipients.

            Thanks

        • #769290

          In that case, you can open a recordset on that table and you’ll know what you’re dealing with. All you need to is add a loop to step through the recordset until you reach .EOF and add each address.

      • #769280

        The user has a table where they can add or delete email addresses at will. They do not have access to the code to add additional lines of – .Recipients.Add Addressee@Addressee.com – for each email address to appear in the TO: field of the email.

        I hope this is clearer.

        Thanks

    • #768967

      [indent]


      when you don’t know how many addressees are going to be used, is there a way to send one email with multiple addressees?


      [/indent] I don’t understand this at all. Where are you getting the addresses if you don’t know how many there are?? confused

    • #769315

      Can’t you loop through building a string of addresses seperated with semi-colons or commas and then use the string?

      Recipients.Add strAddress

    • #769316

      Can’t you loop through building a string of addresses seperated with semi-colons or commas and then use the string?

      Recipients.Add strAddress

    Viewing 3 reply threads
    Reply To: Novell’s Groupwise Email (Access97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: