2010 Apr 29 1:32 PM
Hi experts,
I am getting this exception when i am using the below code to send email.
*" Add recipient (e-mail address)
MOVE cl_cam_address_bcs=>create_internet_address( <fs_recipients>-address )
TO w_recipient.
*" Add recipient with its respective attributes to send request
CALL METHOD w_send_request->add_recipient
EXPORTING
i_recipient = w_recipient
i_express = <fs_recipients>-express
i_copy = <fs_recipients>-copy
i_blind_copy = <fs_recipients>-blind_copy
i_no_forward = <fs_recipients>-no_forward.
*" Set send immediately flag
w_send_request->set_send_immediately( c_x ).
*" Send document
CALL METHOD w_send_request->send( ).
-
Only Email address is passed to the method cl_cam_address_bcs=>create_internet_address , it generates a exception 'CX_ADDRESS_BCS'
Strange , it works for one email id and does not work for the other.
What can be the reason. How to solve it?? Or is any other method there in same class to add recepients.
Hope to get useful answers asap
Best Regards
Bijal
Hi experts,
I am getting this exception when i am using the below code to send email.
*" Add recipient (e-mail address)
MOVE cl_cam_address_bcs=>create_internet_address( <fs_recipients>-address )
TO w_recipient.
*" Add recipient with its respective attributes to send request
CALL METHOD w_send_request->add_recipient
EXPORTING
i_recipient = w_recipient
i_express = <fs_recipients>-express
i_copy = <fs_recipients>-copy
i_blind_copy = <fs_recipients>-blind_copy
i_no_forward = <fs_recipients>-no_forward.
*" Set send immediately flag
w_send_request->set_send_immediately( c_x ).
*" Send document
CALL METHOD w_send_request->send( ).
-
Only Email address is passed to the method cl_cam_address_bcs=>create_internet_address , it generates a exception 'CX_ADDRESS_BCS'
Strange , it works for one email id and does not work for the other.
What can be the reason. How to solve it?? Or is any other method there in same class to add recepients.
Hope to get useful answers asap
Best Regards
Bijal
2010 Apr 29 1:58 PM
Hi Bijal,
Use this structure to catch the exception below
l_addr_exception TYPE REF TO cx_address_bcs, " Address Exception
TRY.
CATCH cx_address_bcs INTO l_addr_exception.
ENDTRY.
Therefore this way you can catch the exception.
Regards,
Md Ziauddin.
2010 Apr 29 2:08 PM
Hi,
The problem is not to catch exception , but to see why is it getting raised. Since its working for one email id and not for the other.
Thanks
2010 Apr 29 2:19 PM
The problem is not to catch exception , but to see why is it getting raised.
So why don't you debug it?
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |