PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Special cases
  • Members of the Email structure taken into account
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
EmailRunApp (Function)
In French: EmailLanceAppli
Starts the native application for sending emails found on the current computer:
  • Versions 19 and later
    Computer running Windows (using the MAPI client),
    New in version 19
    Computer running Windows (using the MAPI client),
    Computer running Windows (using the MAPI client),
  • Mobile device (Android, iPhone, iPad). Mobile device: Android, iPhone, iPad, Universal Windows 10.
The content and the recipients of the email are initialized from the information specified in the Email structure of WLanguage.
Caution:
  • The application for sending emails found on the current computer must have been configured with a valid account for sending emails (SMTP).
  • The current directory can be modified according to the configuration of the application for sending emails.
Versions 19 and later
WINDEV Notes:
  • This function is based on the MAPI client installed on the computer. If the MAPI client is not found, the function searches for the default client among: Microsoft Outlook, Outlook Express, Eudora, IncrediMail, Netscape, Mozilla Thunderbird, Mozilla.
  • Both the application and the MAPI client must be in 32 bits or in 64 bits. Indeed, if client is a 64-bit application, it will only be seen by the applications compiled in 64 bits (similarly, if client is a 32-bit application, it will only be seen by the applications compiled in 32 bits).
New in version 19
WINDEV Notes:
  • This function is based on the MAPI client installed on the computer. If the MAPI client is not found, the function searches for the default client among: Microsoft Outlook, Outlook Express, Eudora, IncrediMail, Netscape, Mozilla Thunderbird, Mozilla.
  • Both the application and the MAPI client must be in 32 bits or in 64 bits. Indeed, if client is a 64-bit application, it will only be seen by the applications compiled in 64 bits (similarly, if client is a 32-bit application, it will only be seen by the applications compiled in 32 bits).
WINDEV Notes:
  • This function is based on the MAPI client installed on the computer. If the MAPI client is not found, the function searches for the default client among: Microsoft Outlook, Outlook Express, Eudora, IncrediMail, Netscape, Mozilla Thunderbird, Mozilla.
  • Both the application and the MAPI client must be in 32 bits or in 64 bits. Indeed, if client is a 64-bit application, it will only be seen by the applications compiled in 64 bits (similarly, if client is a 32-bit application, it will only be seen by the applications compiled in 32 bits).
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Versions 19 and later
WINDEVWindows This function is now available for the WINDEV applications in Windows.
New in version 19
WINDEVWindows This function is now available for the WINDEV applications in Windows.
WINDEVWindows This function is now available for the WINDEV applications in Windows.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Send a message with attachment
Email.Recipient[1] = "recipient@email.com"
Email.NbRecipient = 1
Email.Subject = "Subject of message"
Email.Message = "Text of the message"
Email.Attach[1] = "/sdcard/photo.jpg"
Email.NbAttach = 1
EmailRunApp()
Syntax
EmailRunApp()
Remarks

Special cases

  • A fatal error is triggered if no application for sending emails is found on the current computer.
  • A non-fatal error is triggered if no application for sending emails is found on the current computer. To find out whether the application for sending emails failed to start, use the ErrorOccurred variable.
  • AndroidAndroid Widget iPhone/iPad EmailRunApp can be used in the emulator. It cannot be used in the simulator.
  • AndroidAndroid Widget The application for sending emails supplied by default in the former versions of Android (<= 1.6) cannot be used to initialize the message with more than one attachment. In this case, only the first attachment described in Email.Attach will be associated with the message.
  • AndroidAndroid Widget In Android, if the message to send includes attachments, these ones must be found on the shared memory (example: the SDCard) in order to be accessible to the email client.
  • To reinitialize the Email structure, use EmailReset.
  • EmailRunApp is a non-locking function. The code that follows the call to this function will continue to run as soon as the application for sending emails is started.
  • There is no way to find out whether the sending of the email was validated by the user.

Members of the Email structure taken into account

WINDEVAndroid Only the following members of the Email structure will be taken into account when initializing the message to send:
  • Email.Attach
  • Email.Cc
  • Email.Bcc
  • Email.Bcc
  • Email.Recipient
  • Email.Message
  • Email.NbAttach
  • Email.NbCc
  • Email.NbBcc 
  • Email.NbBcc
  • Email.NbRecipient
  • Email.Subject
iPhone/iPadUniversal Windows 10 App The following members are taken into account:
  • Email.Attach
  • Email.Cc
  • Email.Bcc
  • Email.Recipient
  • Email.Message
  • Email.Subject
Related Examples:
WM Expense Account Cross-platform examples (WINDEV Mobile): WM Expense Account
[ + ] This example allows you to manage your fees.

Let's see the main features of this application:
- The input of invoices
- Management of foreign currencies
- Inclusion of photo document for the invoices
- Ability to email the expense account
- Ability to track the expense accounts
- ...
Components
WINDEVReports and Queries wd230com.dll
Android wd230android.jar
Minimum required version
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment