- Special cases
- Members of the Email structure taken into account
- Application in the background: Specific case from Android 10
In french: EmailLanceAppli
Starts the native application for sending emails found on the current computer:
- Computer running Windows (using the MAPI client),
- Mobile device: Android, iPhone, iPad, Universal Windows 10.
The content and recipients of the email message are initialized from the information specified in the WLanguage Email
- 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.
- This function is based on the MAPI client installed on the computer ("Simple MAPI" is not sufficient). 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).
// Send a message with attachment
Email.Recipient = "email@example.com"
Email.NbRecipient = 1
Email.Subject = "Subject of message"
Email.Message = "Text of the message"
// Photo.jpg is a file created by the application
Email.Attach = SysDirExternalStorage(1, ssePublicDocument) + [fSep] + "photo.jpg"
Email.NbAttach = 1
Members of the Email structure taken into account
Only the following members of the Email structure will be taken into account when initializing the message to send:
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.
EmailRunApp 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 Expense Account
This page is also available for…