Official Content

The Interop external object provides several methods to interact with the device in which the app is being executed.

The SendEmailAdvanced method enables you to open an Email native application and fill the message fields with values taken from the parameters.

InteropEOSendEmailAdvancedMethod

There are two SendEmailAdvanced methods with the same name. The difference between them is the number of parameters needed. Another method to achieve the same objective but with fewer parameters is the SendEmail method.   

The following steps guide you on how to use the SendEmailAdvanced method.

Step 1

Create a Panel object with the following variables:

SendEMailAdvanceVariables

Note: In the SendEmailAdvanced method, as well as in the SendEmail method, the size of the VarChar data type parameters passed to it doesn't matter. Even though it asks for a VarChar(200), it could receive a message of any size, including bigger than 200.

Step 2

Add the variables to the Layout:

SendEmailAdvanceLayout

Step 3

Right-click on the Application Bar and add a button...

SendEmailAdvanceActionDefinition1

...with the 'Send Email' event associated with it:

Event 'Send EMail'
    Interop.SendEmailAdvanced(&to,&Cc,&Bcc,&Subject,&Message)
EndEvent

Step 4

Now all that's left is to press F5. By scanning the QR code or using an emulator, you will see the results:

SendEmailAdvanceAndroidEmpty

SendEmailAdvanceAndroidCompleted

Note: Since GeneXus 17 upgrade 4, it is possible to attach files to an email in Android and Apple generators.

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant