STEP 1: Take help from R/3 Basis to maintain the user(s) in SU0, SU02 and SCOT transactions and maintain email addresses and IP address as well as port of the mail server in the SMTP settings. For the settings please refer SAP note 455140.
STEP 2: Take help from N&S team to get the SMTP relay access unblocked for the R/3 server to send the mail to the mail server.
STEP 3: The code written for sending of mail from SAP R/3 backend to outlook is as below;
STEP 4: Change the code as per requirements. Settings can be done for attachments, cc and bcc.