Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Novell's Groupwise Email (Access97)

    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?

    <Begin Code>
    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
    <End Code>

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Novell's Groupwise Email (Access97)

    <hr>when you don't know how many addressees are going to be used, is there a way to send one email with multiple addressees?<hr>
    I don't understand this at all. Where are you getting the addresses if you don't know how many there are?? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell's Groupwise Email (Access97)

    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

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Novell's Groupwise Email (Access97)

    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.
    Charlotte

  5. #5
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell's Groupwise Email (Access97)

    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

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Novell's Groupwise Email (Access97)

    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.

  7. #7
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell's Groupwise Email (Access97)

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

    Recipients.Add strAddress
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  8. #8
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell's Groupwise Email (Access97)

    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

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Novell's Groupwise Email (Access97)

    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.

  10. #10
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Novell's Groupwise Email (Access97)

    Thanks Hans.

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

    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •