Sending mail via APEX
Sending mails is an important feature in a web application. You can use it when you want to confirm something, you want to send information to the user, or the user wants to send your company an e-mail with an inquiry. In this recipe we will make a section on the home page where users can request information via e-mail.
Getting ready
Your database should be able to send outbound e-mails. Therefore, check that your database is configured for sending e-mails.
How to do it...
In the Application Builder, go to page 1 of your application.
In the Regions section, click on the Add icon to create a new region.
Select HTML.
Select HTML again. This time it's for the type of HTML region.
Enter a title for this region. For example,
Contact
and click on Next.In the textarea, enter the following text:
If you have any questions, please mail us
.Click on the Create Region button.
In the Items section, click the Add icon to create a new item.
Select Text Field and click on Next.
Enter a name for...