Structure of the SAP Internet Mail Gateway 
The SAP Internet Mail Gateway consists of the following executable programs:
A configuration profile with the logon data for the R/3 System and the call up of the mailing program is created and stored in the coded form with this program.
This program transfers the messages from the mailing program to the R/3 System.
This program transfers the messages from the R/3 System to the mailing program.
The gateway is linked via RFC with the R/3 System and via direct program calling with the mailing program. The following graphic clarifies the data flow for outgoing and incoming messages, where the mailing program sendmail is used with the configuration file Sendmail.cf:
Outgoing messages are generated and sent in SAPoffice or by an R/3 application. They are then transferred from SAPconnect via RFC to Mlunxsnd. Mlunxsnd converts the messages into MIME format (Multipurpose Internet Mail Extension), reads from the configuration profile the command to call up the mailing program and transfers the messages to the mailing program for forwarding to the Internet. If the mailing program cannot transfer a message to the Internet, it generates a non-delivery receipt, which contains the sender as an Internet message in its SAPoffice inbox.
The mailing program takes incoming messages from the Internet, reads from the relevant configuration file the data on calling Mlsomail and transfers the messages to Mlsomail. Mlsomail converts the messages into a compatible format for the R/3 System, reads from the configuration profile the data for logon to the R/3 System and then transfers the messages to SAPconnect. The message recipients are determined from address management, and the messages are placed in the SAPoffice inbox. SAPconnect returns the message to the gateway, whether or not the messages were sent successfully. This transfers the message to the mailing program, with which the sender can be sent a non-delivery receipt in the case of errors.
The SAP Internet Mail Gateway for AS/400
For system platform AS/400 the SAP Internet Mail Gateway contains the additional following programs:
AnyMail/400 is configured via this program.
Outbound program for AnyMail/400
Outbound program for AnyMail/400
The following graphic clarifies the data flow for outgoing and incoming messages for AS/400, where the mailing program Anymail/400 is used: