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.
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.
Create a new Panel object:
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).
Insert the variables in the Panel Layout.
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.