Skip to Content
0
Former Member
Nov 13, 2007 at 09:38 AM

Extremely Urgent: sending mails to External email ID

13 Views

Hi All,

Iam working on a smartform and this smartform has to be send to External mails such as YAHOO, gmail,.etc.... apart from SAP email ID's.

Iam using the Function module "SO_NEW_DOCUMENT_ATT_SEND_API1" for sending the mails

The program sends mails only to SAP OUTBOX(Business Workplace) but not to external mails.

Below is my code: Please let me know what Iam missing in it.

Will definitely reward points if anything worthy.

Thanks and regards,

Shaan

CLEAR l_wa_reclist.

l_wa_reclist-receiver = 'xx_xxxx@yahoo.com'

l_wa_reclist-rec_type = 'U'.

  • l_wa_reclist-com_type = 'INT'.

  • l_wa_reclist-express = 'X'.

APPEND l_wa_reclist TO l_it_reclist.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = l_wa_doc_chng

put_in_outbox = 'X'

  • IMPORTING

  • COMMIT_WORK = l_vflag

TABLES

packing_list = l_it_objpack

object_header = l_wa_objhead

contents_bin = l_it_objbin

contents_txt = l_it_objtxt

receivers = l_it_reclist

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.

IF sy-subrc <> 0.

ENDIF.