the program doesn't send the e-mail why....?

Question:
what's the problem............?
REPORT Z_EMAIL_CONSUL.
DATA: SENT LIKE SONV-FLAG.
DATA: EMAIL_ID LIKE SOFOLENTI1-OBJECT_ID.
DATA: BEGIN OF EMAIL_DATA.
INCLUDE STRUCTURE SODOCCHGI1.
DATA: END OF EMAIL_DATA.
DATA: BEGIN OF EMAIL_SEND OCCURS 10.
INCLUDE STRUCTURE SOMLRECI1.
DATA: END OF EMAIL_SEND.
DATA: BEGIN OF EMAIL_TEXT OCCURS 10.
INCLUDE STRUCTURE SOLISTI1.
DATA: END OF EMAIL_TEXT.
data: SEND_TO type SOMLRECI1-RECEIVER value 'eliramy@tnuva.co.il'.
data: SUBJECT(30) value 'mimsak'.
data: message(84) value 'check transfer'.
EMAIL_TEXT-LINE = message.
APPEND EMAIL_TEXT.
EMAIL_DATA-OBJ_NAME = 'MESSAGE'.
EMAIL_DATA-OBJ_DESCR = SUBJECT.
EMAIL_DATA-OBJ_LANGU = 'E'.
EMAIL_DATA-SENSITIVTY = 'P'.
EMAIL_DATA-OBJ_PRIO = '1'.
EMAIL_DATA-NO_CHANGE = 'X'.
EMAIL_DATA-PRIORITY = '1'.
BREAK-POINT.
EMAIL_SEND-RECEIVER = SEND_TO.
EMAIL_SEND-REC_TYPE = 'U'.
EMAIL_SEND-EXPRESS = 'X'.
APPEND EMAIL_SEND.
BREAK-POINT.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = EMAIL_DATA
DOCUMENT_TYPE = 'RAW'
PUT_IN_OUTBOX = ' '
IMPORTING
SENT_TO_ALL = SENT
NEW_OBJECT_ID = EMAIL_ID
TABLES
OBJECT_CONTENT = EMAIL_TEXT
RECEIVERS = EMAIL_SEND
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.
Answer:
the e-mail address doesn't look right. usually ends in .com etc.
Answer:
the e-mail is o.k.
Answer:
What sy-subrc are you getting from 'SO_NEW_DOCUMENT_SEND_API1' ?
If 0, speak to your basis people, I believe there are some outgoing queues that they can monitor. I have had this problem before, IIRC one f the queues had not been started so the emails were not being sent.
Answer:
i get sy-subrc = 0.
but i don't get the mail.
Answer:
i get sy-subrc = 0.
but i don't get the mail.
As I said. Check with your Basis people. I think there is some other job that has to be running for the email to get sent, I think that just calling the program generated the email and queues it for send but there is a system job that actually sends the email. Maybe someone can advise?
Yorkie
Answer:
What version of SAP are you using? If you are using 4.7, the 'SO_NEW_DOCUMENT_SEND_API1' FM has a new parameter called commit_work, which needs to be set to 'X'.
Answer:
Is the SAP Exchange Connector installed???
SAP doesn't "speak" natively the "language" / protocols of an e-mail server (SMTP).
You need this extra piece of software installed separately from your SAP server, and you need to hook it up to SAP via special RFC connections.
The process is not straightforward at all.
You can find this software on the presentation CD.
Answer:
Thanks, that's the process I was thinking of, but couldn't remember.
Yorkie.
Answer:
Try transaction SCOT and see if SAP Connect is set up and is putting out messages . Program RSCONN01 should be scheduled to run regularly. As said, ask Basis to confirm all this
_________________
Only sheep and Tuly Idiots
need a leader

More Articles:

SAP Query - Output to text file?
STOP : WRITE_FORM is invalid,OPEN _FORM is missing.?
SELECTION SCREEN?
Long windows filenames in DOS (8.3 Problem)?
EXCEL OLE Automation performance issues?
interactive list help?