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

Code eo send e-mail to multiple addresses

Former Member
0 Likes
726

Hi,

I need to send an e-mail to multiple addresses.

Can the Function module SO_NEW_DOCUMENT_SEND_API1

be used to send email to MULTIPLE e-mail addresses ?

1 ACCEPTED SOLUTION
Read only

madan_ullasa
Contributor
0 Likes
632

Hi,

Yes you can..You can add any no. of email ids to the table parameter 'RECEIVERS' of the function module. You can create a distribution list and then add the ids to that dist. list.. use so23 to create the dist. list..

eg..

  • Receiver details

  • The distribution list has the email ids.

wa_reclist-receiver = p_dist.

  • Receiver type is 'internet mail'.

wa_reclist-rec_type = 'C'.

  • Express mail activated

wa_reclist-express = 'X'.

APPEND wa_reclist TO it_reclist.

CLEAR wa_reclist.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = wa_docdata

  • PUT_IN_OUTBOX = ' '

  • IMPORTING

  • SENT_TO_ALL =

  • NEW_OBJECT_ID =

TABLES

packing_list = it_objpack

  • OBJECT_HEADER =

  • CONTENTS_BIN =

contents_txt = it_objtxt

  • CONTENTS_HEX =

  • OBJECT_PARA =

  • OBJECT_PARB =

receivers = it_reclist

4 REPLIES 4
Read only

Former Member
0 Likes
632

check this thread

Read only

madan_ullasa
Contributor
0 Likes
633

Hi,

Yes you can..You can add any no. of email ids to the table parameter 'RECEIVERS' of the function module. You can create a distribution list and then add the ids to that dist. list.. use so23 to create the dist. list..

eg..

  • Receiver details

  • The distribution list has the email ids.

wa_reclist-receiver = p_dist.

  • Receiver type is 'internet mail'.

wa_reclist-rec_type = 'C'.

  • Express mail activated

wa_reclist-express = 'X'.

APPEND wa_reclist TO it_reclist.

CLEAR wa_reclist.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = wa_docdata

  • PUT_IN_OUTBOX = ' '

  • IMPORTING

  • SENT_TO_ALL =

  • NEW_OBJECT_ID =

TABLES

packing_list = it_objpack

  • OBJECT_HEADER =

  • CONTENTS_BIN =

contents_txt = it_objtxt

  • CONTENTS_HEX =

  • OBJECT_PARA =

  • OBJECT_PARB =

receivers = it_reclist

Read only

Former Member
0 Likes
632

Hi,

Yes you can send to multiple Recepients. Make use of the Parameter 'RECEIVERS'.

Read only

Former Member
0 Likes
632

hi ,

yes u can do it just loop through the address table and pass the values to RECEIVERS in the Tables of the function module .

w_receivers-receiver = ld_email.

w_receivers-rec_type = 'U'.

w_receivers-com_type = 'INT'.

w_receivers-notif_del = 'X'.

w_receivers-notif_ndel = 'X'.

APPEND w_receivers TO t_receivers.

HOPE IT HELPS,

Regards,

Vikram.S