Official Content

The SendEmail method offered by the Interop external object provides a way to send an email from your application.

When this method is executed, it opens the native email application of the device with a new email ready to be sent.

image_2023517203910_1_png

The method accepts three parameters:

  • To: Recipient of the email. Based on the Email domain.
  • Subject: Subject of the email.
  • Message: Content of the email to send.

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

Step 1 

Create a new Panel object:

Step 2

Define:

  • A variable based on the Email domain to enter the recipient of the email (For example, &To).
  • Variables based on VarChar(200): one for the subject and another one for the message (For example, &Subject and &Message).

Step 3

Insert the variables in the Panel Layout.

Step 4

Insert a button in the Panel Layout. Double-click on the button and define the following code associated with the event:

Event 'Email'
    Interop.SendEmail(&To,&Subject,&Message)
EndEvent

Done! The entry Panel will accept an email address and a message. When the button is tapped, the native email application of the device will open with the new email ready to be sent.

sendemailiphone1

sendemailiphone2

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