I presume you want to send the email as part of the standard SAP output determination process... if so, you will need to do the business configuration (SPRO) to generate the correct message type in the application. You will also need someone in BASIS to set up the SMTP server.
Have you configured SAP to talk to an external mail system?
You can do this using SAPConnect (transaction SCOT).
You will need to set up an internet node (you can connect to the mail server using RFC, and also HTTP from 6.2 onwards). Once you have done this, you will be able to send mail to your outlook. To look at your 'stuck' messages (the ones that you have sent, but which have not gone anywhere), run transaction SOST.
If you are talking about writing an ABAP program to send email, you can use Function Module 'SO_NEW_DOCUMENT_SEND_API1'or 'SO_NEW_DOCUMENT_ATT_SEND_API1' of you want to send an attachment with the email.
Here are some sample code:
report ztest_0001 .
data: maildata type sodocchgi1.
data: mailtxt type table of solisti1 with header line.
data: mailrec type table of somlrec90 with header line.
start-of-selection.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test'.
maildata-obj_langu = sy-langu.
mailtxt-line = 'This is a test'.
append mailtxt.
mailrec-receiver = 'someone@somewhere.com'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'RAW'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
You can get this info on the SAP Develper's Network and webblogs:
Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface:
Sending E-Mail from ABAP - Version 46D and Lower - API Interface:
Marius