Sending E-Mails from BSP Applications
Use
In this tutorial you will learn how to send e-mails from your BSP application.
For more information, see:
Prerequisites
To complete this tutorial you should already have the following skills:
-
Basic knowledge of creating BSP applications
-
Know how to handle incorrect entries (see also Handling Incorrect Entries)
-
Basic knowledge of using application classes
To send an e-mail, your SAP Web Application Server must be configured as an SMTP server. This contains the following:
-
The SMTP plug-in must be available and configured in the profile
-
In transaction SCOT mailing (SMTP) must be activated and configured
-
A mail domain must be assigned to your system
Ask your system administrator to do this.
Features
A mail request consists of the following objects:
-
Document (type CL_DOCUMENT_BCS)
-
Sender (type CL_SAPUSER_BCS)
-
Receiver (type IF_RECIPIENT_BCS)
-
Possible attachments
-
Mail request (type Typ CL_BCS)
The objects are created, filled and linked to the mail request. Then give the mail request the command to dispatch itself. After some time (depending on the configuration) the mail request is executed.
This tutorial follows on from the tutorial on error handling (see also Handling Incorrect Entries). The application created there is enhanced to incorporate sending confirmation mails.
Activities
-
First, create the Order Page.
-
Then create the Application Class with the associated attributes and methods.
-
Then code the Mail Class Call.