07-17-2008 10:14 AM
Hi...
My requirement is to send a mail to an internet address say ABC@companyid from SAP.
I have used a FM So_New_Document_Send_API1 for the purpose.For this I have provided
e_mailrec-receiver = w_emailid.
e_mailrec-rec_type = 'U'.
APPEND e_mailrec.
But I get an error msg in SOST, that the route from (SAP server) to (mail id) not found.
Instead of internet address when I give rec_type as B i.e. SAP USER it sends a mail to my SAP inbox.
I have also checked SAPConnect, and it is fine.
Is the above FM only for sending mails to SAP id, then wats the FM for sending mails to internet address? Its just sending a 1 line mail without attachment.
P.S: I have gone through search in sdn so please don't provide me with links to other threads.
Reply only if you can actually help and know wats this about.
Thnaks and Regards.
07-17-2008 10:52 AM
Hi,
You can use the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1' .
By passing the email address in receiver field and 'U' in REC type field of the structure receivers of the above function module.
Thanks,
Mahesh.
07-17-2008 10:52 AM
Hi,
You can use the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1' .
By passing the email address in receiver field and 'U' in REC type field of the structure receivers of the above function module.
Thanks,
Mahesh.
07-17-2008 11:55 AM
These are the FM for sending external email :-
SO_DOCUMENT_SEND_API1
Send new document with attachments via RFC
SO_NEW_DOCUMENT_ATT_SEND_API1
(In 4.6C only, You can go to SE37 and click the documentation on how to use it. A sample program is provided there.)
Send new document with attachments via RFC
Note : If you are using FM SO_NEW_DOCUMENT_ATT_SEND_API1 then Export Parameter DOCUMENT_DATA-OBJ_DESCR contains the Subject.
SO_NEW_DOCUMENT_SEND_API1
Send new document
For Code
07-17-2008 12:02 PM
Sim,
i assume your code is absulutely correct than only one ring in my mind is that is your SAP system support SMTP service?
confirm with basis guy.
Amit.
07-17-2008 12:06 PM
Hi,
When I go to SO01(inbox) and send mail, it does get sent and delivered correctly.
It just does not happen from my code.
Thanks.