Changing proxy with the Groupwise email.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nicoleguay
    New Member
    • Oct 2014
    • 4

    #1

    Changing proxy with the Groupwise email.

    I'm trying to change the mandatory in ma access database when I'm sending email.
    I don't want to use my personnel email, I want to use my other email.
    I'm usging Groupwise 8 with 2003 Access.
    I try this code but when I use the proxy I keep crashing.
    My database close.

    Code:
    Dim Courriel As New ClsCourrielGW
        Dim compteur As Integer
        With Courriel
            .Login                                      'Connection à GW
            .Proxy ("<proxy address removed>")
            .Subject = txtObjet                         'Affectation du Sujet
            '.FromText = "AffairesCorporative"
            
    'Dim mobjGWacc As GroupwareTypeLibrary.Account2
    'Dim mobjGWProxyAcc As GroupwareTypeLibrary.Account2
    'Set mobjGWProxyAcc = mobjGWacc.Proxy("<proxy address removed>")
    
            compteur = 0
            If Not IsNull(Trim(Me.AreCourrielPrenomNom)) Then
                message1 = Me.AreCourrielPrenomNom & vbCrLf & vbCrLf & txtMessage
            Else
                message1 = "Bonjour," & vbCrLf & vbCrLf & txtMessage
            End If
            .BodyText = message1               'Affectation du corps du message
            If Not IsNull(Trim(Me!AreCourrielDestinataire)) Then
                .RecTo = Trim(Me!AreCourrielDestinataire)  'Affecter le tableau au destinataire du courriel
                .RecCc = arrCC
                .FileAttachments = txtFichierEnregistre & ".pdf"                'Attacher les fichiers au courriel
                strTemp = .CreateMessage                    'Créer le message
                .ResolveRecipients strTemp                  'Vérifier les récipients
                If IsArray(.NonResolved) Then
                   MsgBox "Des adresses de courriels sont incorrectes.", vbInformation, "Courriel"
                   Exit Sub
                Else
                   .SendMessage strTemp                        'Envoie du message
                   intNbrCourriel = intNbrCourriel + 1
                End If
                .DeleteMessage strTemp, True                'Effacement du message
            End If
        End With
    Can you help me someone ?
    Last edited by Rabbit; Oct 28 '14, 08:28 PM. Reason: e-mail/proxy address in code removed for safety. Please use [code] and [/code] tags when posting code or formatted data.
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    First please follow the trouble shooting section in the following link:
    [*] > Before Posting (VBA or SQL) Code

    Particularly the part on setting option explicit. You will need to run the compile step many times until it completes without error. This is because the compiler stops on the first found error.

    Once you have all of your objects and variables properly defined we can take a stab at the groupwise issue.
    ->>> NOTE>>> it's been 15 years since we used groupwise inhouse; thus, I'm pulling everything from ancient memories.

    -z

    Comment

    • nicoleguay
      New Member
      • Oct 2014
      • 4

      #3
      Hi zmdb,

      I've compiled my code and I don't have error.
      It's after my mail is sent that my Access crashed.
      But my email is ok.
      It's only when I add this line to my code that this happen.

      .Proxy ("my other mailbox")

      When I use my personal adresss everything is ok.
      It's when I want to use my other mailbox.

      Can you help me ?

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        Then you don't have option explicit set for your modules as noted in the trouble shooting section of the afore mentioned link.

        Most likely there is an issue with ClsCourrielGW in that the proxy property isn't defined properly. Please go back thru your code modules and set the option explicit. You will then need to properly declare all of your variables and then compile.

        For Example(from the Novell developer's Guide):
        Code:
        Dim gwApplication As GroupwareTypeLibrary.Application2
        Dim gwAccount As GroupwareTypeLibrary.Account2
        Private Sub AccountLogon()
        Set gwApplication = CreateObject(“NovellGroupWareSession”)
        Set gwAccount = gwApplication.Login
        End Sub
        You might want to follow that link to the developer's guide, I'm sure it will prove helpful.
        Last edited by zmbd; Oct 30 '14, 07:58 PM. Reason: [z{found my link to the Novell api guide}]

        Comment

        • nicoleguay
          New Member
          • Oct 2014
          • 4

          #5
          I use the Dimitri Furman code and I didn't change it.
          Its starts with :

          Code:
          Option Base 0
          Option Explicit
          Is there anything else I should do ?

          Comment

          • zmbd
            Recognized Expert Moderator Expert
            • Mar 2012
            • 5501

            #6
            you've comment lines 10 thru 11 which establish the account2 object where proxy lives.
            See the developer's link I gave in my last post for the example.

            Comment

            Working...