<?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: invalid recipient address - while sending mails in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777317#M908870</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anybody help me to resolve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish Shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Apr 2008 09:03:29 GMT</pubDate>
    <dc:creator>ashish_shah</dc:creator>
    <dc:date>2008-04-28T09:03:29Z</dc:date>
    <item>
      <title>invalid recipient address - while sending mails</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777314#M908867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to send a PDF form as a mail attachment from my SAP R/3 server (version ECC 6.0)&lt;/P&gt;&lt;P&gt;Using the following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETER : p_addr TYPE adr6-smtp_addr DEFAULT  'ashish.shah xyz.com'.

*"Look up the generated function for the Book Flight Form
DATA : l_name TYPE funcname.

TRY.

    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
      EXPORTING
        i_name     = 'Z_CUST_BOOK_FLIGHT_FORM'
      IMPORTING
        e_funcname = l_name
      EXCEPTIONS
        OTHERS     = 0.

  CATCH cx_fp_api_repository.                           "#EC NO_HANDLER
  CATCH cx_fp_api_usage.                                "#EC NO_HANDLER
  CATCH cx_fp_api_internal.                             "#EC NO_HANDLER

ENDTRY.

DATA : l_outputparams TYPE sfpoutputparams.

*"Start form processing

l_outputparams-getpdf = 'X'.


CALL FUNCTION 'FP_JOB_OPEN'
  CHANGING
    ie_outputparams = l_outputparams
  EXCEPTIONS
    cancel          = 1
    usage_error     = 2
    system_error    = 3
    internal_error  = 4
    OTHERS          = 5.

IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.


*" Call the generated function for the Book Flight Form
DATA : fp_docparams TYPE sfpdocparams,
       reservedonly TYPE bapisbodat-reserved,
       booking_data TYPE bapisbonew,
       fp_result    TYPE fpformoutput.

fp_docparams-fillable = 'X'.
fp_docparams-langu = sy-langu.

CALL FUNCTION l_name
  EXPORTING
    /1bcdwb/docparams  = fp_docparams
    reserved           = reservedonly
    booking_data       = booking_data
  IMPORTING
    /1bcdwb/formoutput = fp_result
  EXCEPTIONS
    usage_error        = 1
    system_error       = 2
    internal_error     = 3
    OTHERS             = 4.

IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.


DATA : pdf TYPE fpformoutput-pdf.

pdf = fp_result-pdf.

*"End the form Processing session
CALL FUNCTION 'FP_JOB_CLOSE'
  EXCEPTIONS
    usage_error    = 1
    system_error   = 2
    internal_error = 3
    OTHERS         = 4.

IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.


*"Create and send the email
DATA : bcs_exception TYPE REF TO cx_bcs.

TRY.

*"Add text to the email body
    DATA : l_subject      TYPE so_obj_des,
           l_mailtext     TYPE bcsy_text,
           l_mailtext_row TYPE soli.

    l_subject = 'Trip Creation Form'.

    CONCATENATE 'Please fill out the form and return it to:'
                'ashish.shah xyz.com'
                INTO l_mailtext_row.

    APPEND l_mailtext_row TO l_mailtext.

*"Create the email document
    DATA : document   TYPE REF TO cl_document_bcs,
           num_rows   TYPE i,
           textlength TYPE so_obj_len.

    DESCRIBE TABLE l_mailtext LINES num_rows.
    num_rows = num_rows * 255.
    MOVE num_rows TO textlength.

    document = cl_document_bcs=&amp;gt;create_document(
                 i_type    = 'RAW'
                 i_text    = l_mailtext
                 i_length  = textlength
                 i_subject = l_subject ).

*"Add ataachment
    DATA : attdoctype TYPE soodk-objtp,
           atttitle   TYPE sood-objdes,
           attsize    TYPE sood-objlen,
           pdftab     TYPE solix_tab.

    attdoctype = 'pdf'.
    atttitle = 'CreateFlight'.
    attsize = XSTRLEN( pdf ).

    pdftab = cl_document_bcs=&amp;gt;xstring_to_solix(
                ip_xstring = pdf ).

    document-&amp;gt;add_attachment( EXPORTING i_attachment_type = attdoctype
                                        i_attachment_subject = atttitle
                                        i_attachment_size = attsize
                                        i_attachment_language = sy-langu
                                        i_att_content_hex = pdftab ).

*"Create persistent send request
    DATA : send_request TYPE REF TO cl_bcs.

    send_request = cl_bcs=&amp;gt;create_persistent( ).

*"Add document to send request
    send_request-&amp;gt;set_document( document ).

*"Get sender object
    DATA : sender TYPE REF TO cl_sapuser_bcs.
    sender = cl_sapuser_bcs=&amp;gt;create( 'A146861' ) .

*"Add sender
    CALL METHOD send_request-&amp;gt;set_sender
      EXPORTING
        i_sender = sender.

*"Create recipient
    DATA : recipient TYPE REF TO if_recipient_bcs.
    recipient = cl_cam_address_bcs=&amp;gt;create_internet_address(
                                              p_addr ).

*"Add recipient with its respective attributes to send request
    send_request-&amp;gt;add_recipient( EXPORTING i_recipient = recipient ).

*"Set send immediately
    send_request-&amp;gt;set_send_immediately( 'X' ).

*"Send document
    send_request-&amp;gt;send( ).

    COMMIT WORK.

    WRITE: 'Email coantaining the Interactive form was sent'.

  CATCH cx_bcs INTO bcs_exception.

    DATA : ex_msg TYPE string.
    ex_msg = bcs_exception-&amp;gt;get_text( ).
    WRITE: 'Caught exception.', ex_msg.

ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I get a Mail sending failure notification in my SAP Businesss work place, with the title "Cannot be sent: Trip Creation Form " With status as :&lt;/P&gt;&lt;P&gt;Status for Recipient ashish.shah xyz.com:&lt;/P&gt;&lt;P&gt;     No delivery to ashish.shah xyz.com, invalid recipient address&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have entered the correct Email IDs, but still getting this error.&lt;/P&gt;&lt;P&gt;Can you guys help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish Shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 14:42:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777314#M908867</guid>
      <dc:creator>ashish_shah</dc:creator>
      <dc:date>2008-04-23T14:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: invalid recipient address - while sending mails</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777315#M908868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have noticed, We do not see the@ in your email id.&lt;/P&gt;&lt;P&gt;ARe you sure you have the @ in the mail id?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 15:08:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777315#M908868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T15:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: invalid recipient address - while sending mails</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777316#M908869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have @ in all the email IDs in my code , but i have removed it from this post.&lt;/P&gt;&lt;P&gt;It seems SDN has implemented some new check - where in it checks for Email IDs in the post and gives error when any email ID is encountered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you now spot anything else , which could be the cause for the status as Invalid receipient?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish Shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 08:36:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777316#M908869</guid>
      <dc:creator>ashish_shah</dc:creator>
      <dc:date>2008-04-24T08:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: invalid recipient address - while sending mails</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777317#M908870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anybody help me to resolve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish Shah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 09:03:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777317#M908870</guid>
      <dc:creator>ashish_shah</dc:creator>
      <dc:date>2008-04-28T09:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: invalid recipient address - while sending mails</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777318#M908871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  ashish shah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had your same problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this example program BCS_EXAMPLE_6 in tr se38. It´s very easy and work well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel Zapardiel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2009 09:54:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invalid-recipient-address-while-sending-mails/m-p/3777318#M908871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-18T09:54:23Z</dc:date>
    </item>
  </channel>
</rss>

