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

Mail sending using BCC option

Former Member
0 Likes
497

Hi Experts,

I need ur help regarding mail sending option. I am using FM "SO_NEW_DOCUMENT_ATT_SEND_API1" for mail sending.

But i want to send mail in BCC in place of mail TO.

Could you please suggest the way?

Thnx in Adv.

Reagrds..........

sunil

3 REPLIES 3
Read only

Former Member
0 Likes
458

Hi,

For this you can do like,



clear RECLIST.

RECLIST-RECIEVER = 'ABC.COM'.
RECLIST-EXPRESS = 'X'.
RECLIST-REC_TYPE = 'U'.
REC_LIST-BLIND_COPY = 'X'.
APPEND RECLIST.

Hope it helps

Regards

Mansi

Read only

0 Likes
458

Thnx Mansi,

Thanks for ur support.

Its working.

Regards.........

sunil

Read only

Former Member
0 Likes
458

HI,

you can define your internal table using the structure "SOMLRECI1"

in this particular structure there's field " BLIND_COPY" initiailize this field

and after this your

BCC option will be activated.

Example code:

FORM send_mail .

DESCRIBE TABLE t_objtxt LINES w_tab_lines.

READ TABLE t_objtxt INTO wa_objtxt INDEX w_tab_lines.

wa_docdata-doc_size =

( w_tab_lines - 1 ) * 255 + STRLEN( wa_objtxt ).

  • Packing data

CLEAR wa_objpack-transf_bin.

wa_objpack-head_start = 1.

wa_objpack-head_num = 0.

wa_objpack-body_start = 1.

wa_objpack-body_num = w_tab_lines.

  • we will pass the HTML, since we have created the message

  • body in the HTML

wa_objpack-doc_type = 'HTML'.

APPEND wa_objpack TO t_objpack.

wa_docdata-obj_descr = 'XX'.

wa_reclist-receiver = 'name @----'.

wa_reclist-rec_type = 'U'.

  • wa_reclist-blind_copy = 'X'. "this is the field u need to initailize

APPEND wa_reclist TO t_reclist.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = wa_docdata

put_in_outbox = 'X'

commit_work = 'X'

TABLES

packing_list = t_objpack

object_header = t_objhead

contents_txt = t_objtxt

receivers = t_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.

ENDFORM.