<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with sending email using cl_bcs class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923660#M1484667</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; By the way, the lastest email I can see in SOST was 3 months ago.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;That may be the problem. I ran your program and it sent and received an e-mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Apr 2010 19:14:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-28T19:14:53Z</dc:date>
    <item>
      <title>Problem with sending email using cl_bcs class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923657#M1484664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to send out an email to internet adress using &lt;STRONG&gt;cl_bsc&lt;/STRONG&gt; class but I could not find it through SOST tcode.&lt;/P&gt;&lt;P&gt;Please help! Following is the source code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report  z_test.

  DATA: send_request        TYPE REF TO cl_bcs.
  DATA: li_main_text        TYPE bcsy_text,
        lw_main_text        LIKE LINE OF li_main_text.

  DATA: document            TYPE REF TO cl_document_bcs.
  DATA: recipient           TYPE REF TO if_recipient_bcs.
  DATA: sender              TYPE REF TO if_sender_bcs.

  DATA: l_mtitle            LIKE sodocchgi1-obj_descr.
  DATA: sent_to_all         TYPE os_boolean.
  DATA: bcs_exception       TYPE REF TO cx_bcs.

  TRY.
*     -------- create persistent send request ------------------------
      send_request = cl_bcs=&amp;gt;create_persistent( ).
*     -------- create and set document---------------
*     Email title
      l_mtitle = 'Testing Email from Khaliachika'.

*     Fill the body of the mail
      REFRESH li_main_text.

      lw_main_text = 'Testing email'.
      APPEND lw_main_text TO li_main_text.
      CLEAR: lw_main_text.

      document = cl_document_bcs=&amp;gt;create_document(
        i_type    = 'RAW'
        i_text    = li_main_text
        i_subject = l_mtitle ).

*     Add document object to send request
      send_request-&amp;gt;set_document( document ).
*     Sender infor
      sender = cl_cam_address_bcs=&amp;gt;create_internet_address(
                'email address here' ).	"Since SDN does not allow to put email address
      send_request-&amp;gt;set_sender( sender ).

*     --------- add recipient (e-mail address) -----------------------
      recipient =
          cl_cam_address_bcs=&amp;gt;create_internet_address(
                'email address' ).

*     Add recipient object to send request
      CALL METHOD send_request-&amp;gt;add_recipient
        EXPORTING
          i_recipient = recipient
          i_express   = 'X'.

*     ---------- send document ---------------------------------------
      sent_to_all = send_request-&amp;gt;send( i_with_error_screen = 'X' ).

*      IF sent_to_all IS INITIAL.
      IF sent_to_all IS INITIAL.
        MESSAGE i500(sbcoms) WITH 'email address'.
        EXIT.
      ENDIF.

      COMMIT WORK.
*   ------------ exception handling ----------------------------------
    CATCH cx_bcs INTO bcs_exception.
      MESSAGE i865(so) WITH bcs_exception-&amp;gt;error_type.
  ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Khanh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Apr 2010 17:10:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923657#M1484664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-28T17:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sending email using cl_bcs class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923658#M1484665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea please?&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt; Removed &amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;Everything was OK and send_to_all = 'X' but I could not see the email in SOST.&lt;/P&gt;&lt;P&gt;By the way, the lastest email I can see in SOST was 3 months ago.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Khanh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: khaliachika on Apr 28, 2010 8:01 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Apr 28, 2010 3:04 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Apr 2010 17:38:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923658#M1484665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-28T17:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sending email using cl_bcs class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923659#M1484666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the Recipient Email address maintained in SCOT ?. It needs to be maintained in SCOT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Apr 2010 18:58:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923659#M1484666</guid>
      <dc:creator>phanir_mullapudi</dc:creator>
      <dc:date>2010-04-28T18:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sending email using cl_bcs class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923660#M1484667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; By the way, the lastest email I can see in SOST was 3 months ago.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;That may be the problem. I ran your program and it sent and received an e-mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Apr 2010 19:14:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923660#M1484667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-28T19:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sending email using cl_bcs class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923661#M1484668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Apr 2010 22:31:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923661#M1484668</guid>
      <dc:creator>phanir_mullapudi</dc:creator>
      <dc:date>2010-04-28T22:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sending email using cl_bcs class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923662#M1484669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phani,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue was because of SOST configuration, it was default uncheck the option 'Select waiting send requests in selected time period only' in Options tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I rewarded you 2 points already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried Rob's suggestion and found the target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time,&lt;/P&gt;&lt;P&gt;Khanh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: khaliachika on Apr 29, 2010 1:12 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Apr 2010 23:09:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-sending-email-using-cl-bcs-class/m-p/6923662#M1484669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-28T23:09:50Z</dc:date>
    </item>
  </channel>
</rss>

