Skip to Content
0
Former Member
Jul 17, 2008 at 05:29 AM

Send External Email

45 Views

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.