Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send fax or E-mail with VFP without 3rd party?
Message
 
 
To
30/07/1998 16:31:34
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00122851
Message ID:
00122896
Views:
16
David,

Here's some sample code for using the MAPI controls that ship with VFP:
activate window "debug output"

* simple test email program using MAPI

oleMAPISession = createobject( "MSMAPI.MAPISession.1" )

* Signon to mail
with oleMAPISession
   .UserName = "Test"
   .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 = "DavidFrankenbach@worldnet.att.net"
   .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

* Signoff

oleMAPISession.Signoff()
>Is there a way to send a fax using the software that comes with the MS OS, or thier free downloads. I have the free Outlook 98 (from when MS gave it away). I have been trying to get VFP5 to send E-mail or a fax without luck. I have not figured out the MAPI OCX for E-mail. Any examples would help.
>(Do I allready have the software I need ?)
>My old app in FP2.6 is using WinFax 4.1 by DDE, but I can not get WinFax 4 thru 8.03 to run on my NT4. I want to give my coworkes the updated VFP5 code I have been working on but they demand the fax intagration. And why stop there, I want to send E-mail quotations too.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform