Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sending mail to Internet address from SAP system

former_member215781
Active Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

4 REPLIES 4

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

http://www.forum.saptechies.com/viewtopic.php?t=5562

former_member181995
Active Contributor
0 Kudos

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.

0 Kudos

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.