OLE Messaging and logging in to exchange

OLE Messaging and logging in to exchange

Post by Marc Fase » Sun, 15 Dec 1996 04:00:00




> I'm using the following code:

> Set MapiSession = CreateObject("Mapi.Session")
> MapiSession.Logon profileName:="Default Exchange Profile",
> profilePassword:="password", showDialog:=False, newSession:=True
> Set MapiMessage = MapiSession.Outbox.Messages.Add

> to log in to exchange but it only works if I have the exchange client open
> on my desktop.  Anyone have any ideas as to why this may be?

> --
> Ken Fayal
> Sr. Analyst/Programmer
> San Diego Gas & Electric
> (619) 654-6320


I use this and it works fine for me whether I am in the client or not. I
don't have a password, though.

Public Sub Logon()
Dim sProfileName As String
On Error GoTo Err_Handler
    Set objSession = CreateObject("MAPI.Session")
    sProfileName = "Default Exchange Profile"
    objSession.Logon profileName:=sProfileName, showDialog:=False,
newSession:=True
Exit Sub
Err_Handler:
    Call Fehler("Mail (General)_Logon")
    End
End Sub

--
***************************************

hancke & peter GmbH
Neukoellner Strasse 2
52068 Aachen
Germany
***************************************

 
 
 

OLE Messaging and logging in to exchange

Post by Thielma » Fri, 27 Dec 1996 04:00:00


I use the following.  Works fine for me logged in or not.

oSession = CreateObject("MAPI.Session")
oSession.Logon(gcLogonName,.f.)
                && logonname must be valid 'profile' name
oMessage = oSession.OutBox.Messages.Add()
oMessage.Subject = gcMessageSubject
oMessage.Text = gcMessageText

  for a = 1 to alen(laFileName)
    oAttach = oMessage.Attachments.Add()
    Do Case
      Case gcMessageType = "Embed"    && Embedded Objects
        oAttach.Type = 1
        oAttach.ReadFromFile(laFileName(1,a))
        oAttach.Name = laAttachName(1,a)
      Case gcMessageType = "Link"     && Linked Objects
        oAttach.Type = 2
..........................

Gary Thielman




> > I'm using the following code:

> > Set MapiSession = CreateObject("Mapi.Session")
> > MapiSession.Logon profileName:="Default Exchange Profile",
> > profilePassword:="password", showDialog:=False, newSession:=True
> > Set MapiMessage = MapiSession.Outbox.Messages.Add

> > to log in to exchange but it only works if I have the exchange client
open
> > on my desktop.  Anyone have any ideas as to why this may be?

> > --
> > Ken Fayal
> > Sr. Analyst/Programmer
> > San Diego Gas & Electric
> > (619) 654-6320

> I use this and it works fine for me whether I am in the client or not. I
> don't have a password, though.

> Public Sub Logon()
> Dim sProfileName As String
> On Error GoTo Err_Handler
>     Set objSession = CreateObject("MAPI.Session")
>     sProfileName = "Default Exchange Profile"
>     objSession.Logon profileName:=sProfileName, showDialog:=False,
> newSession:=True
> Exit Sub
> Err_Handler:
>     Call Fehler("Mail (General)_Logon")
>     End
> End Sub

> --
> ***************************************

> hancke & peter GmbH
> Neukoellner Strasse 2
> 52068 Aachen
> Germany
> ***************************************


 
 
 

OLE Messaging and logging in to exchange

Post by jmb » Tue, 31 Dec 1996 04:00:00


I had a similar problem.  Although my program could log in, when
sending a message it couldn't add a recipient from the address
book unless Exchange Client (EC) was running.

It turned out that the log on profile was different than the profile
used in EC.  They had different rights and EC could use an
address from the global address list that my program could
not.

This was running on an NT workstation.  When my program ran
on 95, it worked fine.
--
John Beckett
Vendor Managed Technologies / EZ EDI, Inc.




 > >
 > > I'm using the following code:
 > >
 > > Set MapiSession = CreateObject("Mapi.Session")
 > > MapiSession.Logon profileName:="Default Exchange Profile",
 > > profilePassword:="password", showDialog:=False, newSession:=True
 > > Set MapiMessage = MapiSession.Outbox.Messages.Add
 > >
 > > to log in to exchange but it only works if I have the exchange client
 open
 > > on my desktop.  Anyone have any ideas as to why this may be?
 > >

 
 
 

1. OLE Messaging and logging in to exchange

I use this and it works fine for me whether I am in the client or not. I
don't have a password, though.

Public Sub Logon()
Dim sProfileName As String
On Error GoTo Err_Handler
    Set objSession = CreateObject("MAPI.Session")
    sProfileName = "Default Exchange Profile"
    objSession.Logon profileName:=sProfileName, showDialog:=False,
newSession:=True
Exit Sub
Err_Handler:
    Call Fehler("Mail (General)_Logon")
    End
End Sub

--
***************************************

hancke & peter GmbH
Neukoellner Strasse 2
52068 Aachen
Germany
***************************************

2. Forward mail to a 3rd party account

3. NT4 and Exchange 5.5

4. Link to message with OLE Messaging

5. mail in the internet mail service

6. Ole Messaging. Messages stay in Outbox

7. Service Pack 3

8. OLE Messaging 1.0

9. Ole messaging version

10. OLE Messaging with Forms

11. OLE Messaging

12. Help with OLE Messaging