Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error sending mail via MAPI on a win2k Server
Message
 
To
10/05/2002 06:38:34
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00654684
Message ID:
00655024
Views:
48
>>And are you logged in at the server with the same account when running the program? I presume you're application is a conventional desktop kinda app - not COM or dll....
>
>Yes, I'm logged at the server, and it's a conventional (not a service) app.
>
>Fernando

I think you may have the syntax wrong. Here's what I have:
activate window "debug output"
* simple test email program using MAPI
oleMAPISession = createobject( "MSMAPI.MAPISession.1" )
* Signon to mail
with oleMAPISession
	.LogonUI = .F.
   .UserName = "Novell Default Settings"
   .Password = ""
   .Signon()
   * Check the SignOn status
   if ( .SessionID > 0 )
      oleMAPIMessages = createobject( "MSMAPI.MAPIMessages.1" )
      * tell the message the SessionID
      oleMAPIMessages.SessionID = .SessionID
      debugout "Successful mail log on"
   else
      debugout "Mail login failed"
   	  return   
   endif
endwith
* Send an email
with oleMAPIMessages
   .Compose()
   * Set the Recipient name and resolve
   .RecipDisplayName = "MichaelHogan@id-8.com"   
   .RecipType = 1
   .ResolveName()   
   .MsgSubject = "This is the Subject"
   .MsgNoteText = "This is the email text"   
   .Send( .f. )
endwith
* Read the InBox
*!*	with oleMAPIMessages
*!*	   .Fetch()
*!*	   for i = 0 to .MsgCount-1
*!*	      .MsgIndex = i
*!*	      debugout .MsgSubject
*!*	   endfor
*!*	endwith
oleMAPISession.Signoff()
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform