‎2010 Feb 05 9:11 AM
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
‎2010 Feb 05 9:23 AM
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
‎2010 Feb 05 9:58 AM
Thnx Mansi,
Thanks for ur support.
Its working.
Regards.........
sunil
‎2010 Feb 05 10:04 AM
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.