‎2006 Feb 17 6:35 PM
Dear SAP World,
I'm using BCS (Business Communication Services) methods, to compose and send some e-mail messages directly from an ABAP program, to an user's Outlook inbox.
So far, everything is working fine.
Two questions, tough:
1. How can i add an address to the "Carbon Copy" field, so that the message is sent to two addresses, at the same time?
2. Is there any way to format the message body, so that, for instance, i can send a sentence highlighted as bold?
Thanks in advance for your cooperation.
Keep up the good work.
Sincerely,
Hugo Ferreira
‎2006 Feb 17 6:52 PM
Hi,
if you are using this FM..
SO_NEW_DOCUMENT_ATT_SEND_API1
you can send the CC , using
for this you need to append the table parameter
RECEIVERS.
append two record with copy = '', then
for the id which you want as specify copy = 'X'.
append it.
now you have one id with out copy, and the other CC.
for making extra features like html..then check this thread...
regards
vijay
‎2006 Feb 17 6:55 PM
In function module SO_OBJECT_SEND, table sparameter RECEIVERS has field SNDCP and SNDBC which you can set to mark as a copy or blind cc.
Pls check this out.
‎2006 Feb 17 7:02 PM
Please make sure to check out this weblog by Thomas Jung. I believe that this will show you what you need to do.
/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
Pay close attention to the ADD_RECIPIENT method.
* Add recipient with its respective attributes to send request
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = recipients_line-i_express
i_copy = recipients_line-i_copy
i_blind_copy = recipients_line-i_blind_copy
i_no_forward = recipients_line-i_no_foward.Regards,
Rich Heilman
‎2006 Feb 18 10:53 AM
to bold and other formats set the type to HTM like below.
document = cl_document_bcs=>create_document(
i_type = 'HTM'
i_text = text
i_length = conlengths
Now you can pass html string as content (in the above example variable name text.)
for example for bold you can pass
'<b>This is bold text</b>'
Regards
Raja
‎2006 Feb 21 10:42 AM
Hello Rich. Thanks for your answer. However, the I_COPY parameter of method ADD_RECIPIENT, only indicates if it should send or not a carbon copy, thru a flag type field. But, where do i indicate the e-mail address for the carpon copy, assuming that the I_RECIPIENT parameter stands for the main recipient of the e-mail message?
Thanks in advance,
Hugo Ferreira.
‎2006 Feb 21 11:10 AM
Hi,
Check this line
recipient = cl_cam_address_bcs=>create_internet_address( recipients_line-c_address ).
It is actually assigning the email address.
Since the entire process is in loop.Endloop,if you are passing the recipient for blind carbon copy,that address will come in bcc.
If you are passing,blind copy and carbon copy parameter,that address will be in to field.
Check it out and kindly reward points by clicking the star on the left of reply,if it helps.
‎2006 Feb 21 11:21 AM
you have to call
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = recipients_line-i_express
i_copy = recipients_line-i_copy
i_blind_copy = recipients_line-i_blind_copy
i_no_forward = recipients_line-i_no_foward.
as many times as there are recepients.
suppose you have three recepients. first one without i_copy and the other ones with i_copy = 'X'
Regards
Raja