Whenever a mail needs to be sent to a user when a particular event has raised then the function module SWE_EVENT_MAIL...
can be used for the same. An event linkage needs to be defined as follows:
1. Go to transaction SWETYPV
2. Select "New entries".
3. Enter the Business object and the corresponding event name. Enter the SAP userid in the "Receiver type" and SWE_EVENT_MAIL as the reciever FM.
4. Set 'Type linkage' to active.
Whenever the event is raised, an SAP office mail is sent to the corresponding SAP user id. This mail also includes the container elements of that particular event.