ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Web-specific functions / Browser functions
  • Special cases
  • Background application: Specific to Android 10 and higher
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
EmailOpenMail (Function)
In french: EmailOuvreMessagerie
Opens the default messaging software:
  • of Web user on the browser computer.
  • of the user on the current Windows computer.
  • AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst on the phone.
AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst Remark: The EmailRunApp function can also be used to open the phone's messaging software directly.. We recommend using the EmailRunApp function (for attachment management, multi-recipient mailings, etc.).
Example
// Opens the messaging software
EmailOpenMail()
// Opens the software and specifies the email recipient
// the subject and text of the email
EmailOpenMail("pcsoft@pcsoft.fr", "Subject: LST", "Text: Le sommaire de la LST")
Syntax
EmailOpenMail([<Email address> [, <Email subject> [, <Message body>]]])
<Email address>: Optional character string
Email address of recipient. This address will be displayed in the window of messaging software.
<Email subject>: Optional character string
Email subject that will be displayed in the window of messaging software.
<Message body>: Optional character string
Text of message. Non-alphanumeric characters are automatically converted in order to allow for special characters to be passed (CR characters, tabulations, ...).
Remarks

Special cases

  • A non-fatal error is triggered if no application for sending emails is found on the device. To find out whether the application for sending emails failed to start, use the ErrorOccurred variable.
  • AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst EmailOpenMail can be used in the emulator. It cannot be used in the simulator.
  • EmailOpenMail is a non-blocking 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.
AndroidAndroid Widget

Background application: Specific to Android 10 and higher

Starting with Android 10, it is no longer possible to open a window when the application is in the background.
EmailOpenMail can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). The application will be brought back to the foreground when the notification is clicked, if the ActivateApplication property is set to True. You can also open a window from the procedure passed to the ActionClick property.
Related Examples:
WM Managing Contacts Cross-platform examples (WINDEV Mobile): WM Managing Contacts
[ + ] This example presents the management of contacts for Android et iOS.
It is used o:
- list the contacts found on the phone
- call the contacts
- send SMSs to the contacts
- ...
Component: wd300com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help