In french: EmailOuvreMessagerie
Opens the default messaging software:
- of Web user on the browser computer.
- of the user on the current Windows computer.
- on the phone.
// Opens the messaging software
// Opens the software and specifies the email recipient
// the subject and text of the email
EmailOpenMail("firstname.lastname@example.org", "Subject: LST", "Text: The LST summary")
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, ...).
Action of EmailOpenMail
EmailOpenMail triggers an action on the page displayed in the browser of Web user. However, Internet browsers allow one single action on the page per process.
For example, if a process performs the following actions:
- Send a page to the server (PageSubmit).
- Open the messaging software (EmailOpenMail).
Only the last action (open the messaging software) will be performed.
In which code should I use EmailOpenMail?
In WEBDEV, some types of buttons automatically trigger an action on the page:
- "submit" button,
- "other" button whose action differs from "none".
If EmailOpenMail is used in the browser click code of these buttons (or in a procedure called by this process), this function will be ignored: only the action of the button will be performed.
Consequences: EmailOpenMail cannot be used in a code triggering an action (automatically or not). This function is ignored:
- in the click code of a "send to server" button.
- in the click code of an "other" button whose action differs from "none".
- if it is followed by PageSubmit or by EmailOpenMail (in the current process, in a procedure called by the current process or in another process called by Execute).
To use EmailOpenMail from a button (browser click code of the button), this button must have the following characteristics:
- type of button: "Other".
- action: "None".
Application in the background: Specific case from Android 10
From 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.
- 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.
Cross-platform examples (WINDEV Mobile): WM Managing Contacts
This page is also available for…