02-20-2006 8:38 AM
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
02-20-2006 8:44 AM
Hi viswanath,
1. in scot, in smtp node,
2. press the internet button
3. In ADDRESS AREA,
type
*yahoo.com
*rediffmail.com
etc,etc.
4. Only when such domains are entered,
will sap send mail.
5. It will not send any mail to other domains.
6. Or simply enter *
regards,
amit m.
02-20-2006 8:48 AM
Hai viswanath
Just check these links they may help you...
http://www.sap-basis-abap.com/abap011.htm
Regards,
Srikanth.
02-20-2006 9:09 AM
Hi
Thanks Amit,But I have already did the these settings in SCOT.
Srikanth, The program that I got from the link also gives the same problem.
Regards,
Viswanath Babu.P.D
02-20-2006 9:12 AM
Hi again,
1. Even when i execute SAPconnect manually mail
2. open scot
Process the last button on toolbar (Ctrl+F7) = start send process
it will list down all the pending mails.
press enter .
then it will send one by one.
-
did u try this ?
regards,
amit m.
02-20-2006 9:21 AM
Hi
When I run it in scot after running the program, it says
NO MESSAGES SENT.
The message is not even placed in message Queue
Regards,
Viswanath babu.P.D
02-20-2006 9:52 AM
Hi again,
1. then where is the message shown.
(ie. the number of mails waiting to send)
Completed
Error
In transit
Waiting
?
regards,
amit m.