Setting Environment Variable GWCONFIG 
Use
Path and file names of the configuration profile are specified in the environment variable GWCONFIG so that program Mlunxsnd can access the profile.
Prerequisites
You only have to set the environment variable GWCONFIG under the following conditions:
You have not stored the configuration profile under the name Mailgw.ini in the directory /usr/sap/C11/SYS/profile or in the directory in which the program Mlunxsnd is located.
Procedure
Windows NT
Call up the system control, select the file System and the tab page Environment and under System variables enter the names of the variable and the corresponding value.

Variable |
Value |
GWCONFIG |
C:\sendmail\SIMG\C11_mailconfig |
Unix
Write a shell script in which you set the environment variable GWCONFIG and start program Mlunxsnd, and assign the shell script execute rights. The variable must be set in the Mlunxsnd environment.

Example of the script if Mlunxsnd is activated via start:
Example of the script if Mlunxsnd registration is activated:
Note that the option $* must be set behind the path and file specification of Mlunxsnd so that the program parameter can be transferred.
OS/400
Write a CL program (CL stands for control language) in which you set the environment variable GWCONFIG and start program Mlunxsnd.

Example if Mlunxsnd is activated via registration:
ADDENVVAR ENVVAR(GWCONFIG) VALUE('<Configuration file>')
SBMJOB CMD(CALL MLUNXSND PARM('-a' <RFC_Program_ID>' '-g' '<Host>' '-x' '<sapgwnn>')) JOB(MLUNXSND) CPYENVVAR(*YES)
<Host>
is the host from which the R/3 Gateway runs, <RFC_Program_ID> is the program name that you have defined via transaction SM59, and <sapgwnn> is the gateway service of the R/3 instance (nn stands for the instance number).