Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending Email from VFP
Message
From
28/10/1998 14:10:04
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00151658
Message ID:
00151817
Views:
20
This looks interesting. I've been thinking it would be cool if our app could email me the error log so I can keep an eye on the errors. (This would be internet mail)

What is MAPI?

Is there a generic way of sending mail that isn't particular about which email software the user has?

Another thing I'd like to do is put a hyperlink to our website under the help menu. I've seen it done in commercial software. Can you do that in VFP so it automatically loads up the browser and goes to that page?

Thanks,

-Michelle

>Shane,
>
>Here's some code for MAPI
>
>
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()
>
>
>>What is the easiest way to send email from Visual FoxPro?
>>
>>I have a client running the same application at several different locations. They want to share / transmit data between locations using the internet. Does anyone have any ideas on the best way to accomplish this?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform