Application Development and Automation 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: 
Read only

Send External Email

Former Member
0 Likes
1,430

Hi All

My requirement is to send an email (Lets say, to my gmail ID).

I have tried FMs SO_DOCUMENT_SEND_API1 and SO_OBJECT_SEND.

In FM SO_DOCUMENT_SEND_API1 , email is only reaching till SCOT/SOST and not moving further. The only way that the mail can be sent is through the Standard Report rsconn01. Again when I use SUBMIT RSCONN01, all the mails pending in SOST are released and sent to the respective ids. What I want here is only the email which has been sent from my ID should be released from sapconnect.

In FM SO_OBJECT_SEND, no error is being reported (sy-subrc EQ 0) but there is no trace of this email, anywhere.

This is the sample of data i m passing to FM so_object_send

DATA: hd_change LIKE sood1.

DATA: receivers LIKE soos1 OCCURS 0 WITH HEADER LINE.

DATA: emailbody LIKE soli OCCURS 0 WITH HEADER LINE.

hd_change-objla = 'EN'.

hd_change-objdes = 'Errors'.

hd_change-objsns = 'F'.

receivers-recesc = 'U'.

receivers-recextnam = 'Mygmailid'.

receivers-sndart = 'INT'.

APPEND receivers.

  • Create the error message

APPEND 'This is test message' TO emailbody.

APPEND 'This is test message' TO emailbody.

APPEND 'This is test message' TO emailbody.

APPEND 'This is test message' TO emailbody.

APPEND 'This is test message' TO emailbody.

APPEND 'This is test message' TO emailbody.

APPEND 'This is test message' TO emailbody.

CALL FUNCTION 'SO_OBJECT_SEND'

EXPORTING

object_hd_change = hd_change

object_type = 'RAW'

outbox_flag = 'X'

owner = sy-uname

TABLES

objcont = emailbody[]

receivers = receivers

EXCEPTIONS

active_user_not_exist = 1

communication_failure = 2

component_not_available = 3

folder_not_exist = 4

folder_no_authorization = 5

forwarder_not_exist = 6

note_not_exist = 7

object_not_exist = 8

object_not_sent = 9

object_no_authorization = 10

object_type_not_exist = 11

operation_no_authorization = 12

owner_not_exist = 13

parameter_error = 14

substitute_not_active = 15

substitute_not_defined = 16

system_failure = 17

too_much_receivers = 18

user_not_exist = 19

originator_not_exist = 20

x_error = 21

OTHERS = 22.

Can you kindly help me sending the email.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,251

hi

I guess your SOST is not sendign the mails out, use T.Code SBWP check your email status there in your outbox, if it is still pending try to send a test mail from there, also run the rsconn01.

If still your test mail is not dispatched contac your basis team.

Regards

5 REPLIES 5
Read only

Former Member
0 Likes
1,251

Hello,

At the end of teh program just give:

SUBMIT RSCONN01 WITH MODE EQ 'INT' AND RETURN.

This willl only send the emails i.e mode is internet users.

Regards,

Neeraj

Read only

0 Likes
1,251

I have already written :

SUBMIT rsconn01 WITH mode = 'INT' WITH output = 'X' AND RETURN.

Edited by: gopal sharma on Jul 17, 2008 7:36 AM

Read only

Former Member
0 Likes
1,251

Hi Gopal

You should contact to any basis guy who will set something in network so that you can send external mails. Try the same FM and put your sap login id instead of mail address and then check mail by txn so01. It should comes.

regards

Aditya

Read only

Former Member
0 Likes
1,252

hi

I guess your SOST is not sendign the mails out, use T.Code SBWP check your email status there in your outbox, if it is still pending try to send a test mail from there, also run the rsconn01.

If still your test mail is not dispatched contac your basis team.

Regards

Read only

0 Likes
1,251

In SBWP, when I sent the test mail from the outbox I did not receive any mail on to any of my IDs on which I tried. I think as suggested by you guys the problem has to be escalated to BASIS guys. Thanks