Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Using WM_COPYDATA for interprocess communication (VFP9)
How to enumerate cookies and URL History entries in the cache of the local computer
How to make a VFP form fading out when released (GDI version)
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
Disabling mouse and keyboard input for the main VFP window (with the app still running)
Quering Audio Mixer Device
Retrieving size of a remote file
How to draw custom Window Caption on FoxPro form
Reading list of folders and files on FTP server
How to remove a directory that is not empty
Locking and unlocking file of a VFP table
Locking the workstation
Placing On-screen Alert on top of all windows
Retrieving Network Provider information
Subclassing CommandButton control to create BackColor property
Drawing Windows predefined bitmaps using the LoadBitmap functions
How to copy the image of a form to the Clipboard using Bitmap API functions
Quering a waveform-audio input device
Using Extended MessageBox() Class
Retrieving country-specific dialing information from the Windows Telephony list of countries
Sending a standard message with one or more attached files using default email client
Setting the mouse capture to the specified window
Transparent Menu Class (requires VFP9)
Using the LoadImage function to have a bitmap file loaded and displayed on VFP main window
MapiSendMail class for Visual FoxPro application

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Before you begin:
Based on Simple MAPI functions this Custom class allows sending email messages from your default email client to multiple recipients with file attachments.

The interface:
PROCEDURE AddRecipient(lcRcpName, lcRcpAddr)
PROCEDURE AddAttachment(lcFilename)
PROCEDURE SndMessage

Find a code sample using this class here.
 
  Members area. Log in to view this example.
 
  User name:
  Password:
 
 
  Forgot your password?
 
  Sign up for
the Membership
 
 


User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
8175 bytes  
Created: 2002-11-18 13:03:31  
Modified: 2011-12-10 09:20:22  
Visits in 7 days: 69  
Listed functions:
GlobalAlloc
GlobalFree
GlobalSize
MAPISendMail
Printer friendly API declarations
My comment:
Although the Sender object is presented, it looks like it is not supported -- an email Sender is always the default address of the local email client.

Be sure that all attached files are accessible at the moment when you are invoking the MAPISendMail function.

This class does not use MAPILogon and MAPILogoff functions (hSession=0). In this case -- it is called an implicit logon -- the MAPI session is temporary. The implicit session opened for the call is closed by the time the call returns.

Tested on Windows XP Home Edition, Outlook Express 6.

#kwd: sln_sendemail.
Word Index links for this example:
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
A.M. | 2006-07-31 10:33:41
nPosition is now populated in TAttachment.InitAttachment method.
burrowj@ozemail.com.au | 2006-07-31 21:28:45
Another thing to keep in mind.

If you are adding attachments. You must have at least one character in the body of your e-mail or the send function will fail

Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (184.72.91.94)
4 sec.Example: 'Adding user-defined items to the Control Menu of VFP form (requires VFP9)'
48.53 min.Example: 'Downloading files from the FTP server using InternetReadFile'
3.74 hrs.Example: 'One more way to retrieve environment strings'
10.84 hrs.Example: 'Retrieving a universal form for the drive-based path for a network resource'
 Example: 'Storing content of the Clipboard to a bitmap file'
11.06 hrs.Example: 'Running a regular FoxPro form while main VFP window is minimized'
11.07 hrs.Function: 'EnumJobs'
 Function: 'SetThreadExecutionState'
12.11 hrs.Function: 'IsMenu'
 Function: 'GetCapture'
Google
Advertise here!