Skip to Content
0
Former Member
Feb 20, 2006 at 08:38 AM

Problem while sending mail from SAP

271 Views

Hi ABAP gurus,

I tried to send mail from SAP. For this we configured SMTP Services using the transaction SCOT and all are Completed.

When I send a mail using SAPOffice it is Executing successfully and main is delivered to me.

When I tried in the program using the function module 'SO_NEW_DOCUMENT_SEND_API1' mail is not delivered to me but it is placed in SAPoffice outbox.The status of the mail says "SEND PROCESS STILL RUNNING". Even when i execute SAPconnect manually mail is not transmitted.

This is the transaction history of the mail.

Trans. history

18.02.2006 13:44:31 Document sent

13:44:31 Wait for communications service

After This stage Delivery attempt is not taking place.

This is the Code

****Document DATA

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'.

***Receiver

EMAIL_SEND-RECEIVER = 'vijayan@pricol.co.in'.

EMAIL_SEND-REC_TYPE = 'U'.

EMAIL_SEND-EXPRESS = 'X'.

APPEND EMAIL_SEND.

*****************************************************

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

DOCUMENT_DATA = EMAIL_DATA

DOCUMENT_TYPE = 'RAW'

PUT_IN_OUTBOX = 'X'

  • 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.

Please Help me to solve this Problem.

Regards,

Viswanath Babu.P.D