<?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 SAP Email in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936358#M62055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;  Iam using SO_DOCUMENT_SEND_API1 to send email from SAP. The problem is when i released using SOST Tcode status text is " No delivery to sender address invalid recipient" i think this is because of i did't not maintain RFC destination for sender address...here is the code... for sendaddress iam concatenating sysid and objid...i think i want to maintain RFC for objid to identify the sender... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SO_DOCUMENT_SEND_API1'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      sender_address                  = sendaddress&lt;/P&gt;&lt;P&gt;      sender_address_type             = 'SMTP'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              Can anyone give me the solution...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Sep 2005 09:50:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-09-29T09:50:08Z</dc:date>
    <item>
      <title>SAP Email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936358#M62055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;  Iam using SO_DOCUMENT_SEND_API1 to send email from SAP. The problem is when i released using SOST Tcode status text is " No delivery to sender address invalid recipient" i think this is because of i did't not maintain RFC destination for sender address...here is the code... for sendaddress iam concatenating sysid and objid...i think i want to maintain RFC for objid to identify the sender... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SO_DOCUMENT_SEND_API1'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      sender_address                  = sendaddress&lt;/P&gt;&lt;P&gt;      sender_address_type             = 'SMTP'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              Can anyone give me the solution...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2005 09:50:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936358#M62055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-29T09:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936359#M62056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/email/emailhome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/email/emailhome.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2005 09:56:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936359#M62056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-29T09:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936360#M62057</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;this may help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/09/07/sending-e-mail-from-abap--version-46d-and-lower--api-interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html" target="test_blank"&gt;http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp" target="test_blank"&gt;http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points for helpfull answers and close the thread if your question is solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2005 10:04:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936360#M62057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-29T10:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936361#M62058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just test this sample code to send a mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZSENDEMAIL                                                  *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Example of sending external email via SAPCONNECT                    *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
REPORT  zsendemail                    .

PARAMETERS: psubject(40) type c default  'Testing',
            p_email(40)   type c default 'anjali.devi@wipro.com'.

data:   it_packing_list like sopcklsti1 occurs 0 with header line,
        it_contents like solisti1 occurs 0 with header line,
        it_receivers like somlreci1 occurs 0 with header line,
        it_attachment like solisti1 occurs 0 with header line,
        gd_cnt type i,
        gd_sent_all(1) type c,
        gd_doc_data like sodocchgi1,
        gd_error type sy-subrc.

data:   it_message type standard table of SOLISTI1 initial size 0
                with header line.

***********************************************************************
*START-OF-SELECTION.
START-OF-SELECTION.

Perform populate_message_table.

*Send email message, although is not sent from SAP until mail send
*program has been executed(rsconn01)
PERFORM send_email_message.

*Instructs mail send program for SAPCONNECT to send email(rsconn01)
perform initiate_mail_execute_program.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  POPULATE_MESSAGE_TABLE
*&amp;amp;---------------------------------------------------------------------*
*       Adds text to email text table
*----------------------------------------------------------------------*
form populate_message_table.
  Append 'Line1' to it_message.
  Append 'Line2' to it_message.
  Append 'Line3' to it_message.
  Append 'Test- 1' to it_message.
endform.                    " POPULATE_MESSAGE_TABLE


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  SEND_EMAIL_MESSAGE
*&amp;amp;---------------------------------------------------------------------*
*       Send email message
*----------------------------------------------------------------------*
form send_email_message.
* Fill the document data.
  gd_doc_data-doc_size = 1.

* Populate the subject/generic message attributes
  gd_doc_data-obj_langu = sy-langu.
  gd_doc_data-obj_name  = 'SAPRPT'.
  gd_doc_data-obj_descr = psubject.
  gd_doc_data-sensitivty = 'F'.

* Describe the body of the message
* Information about structure of data tables
  clear it_packing_list.
  refresh it_packing_list.
  it_packing_list-transf_bin = space.
  it_packing_list-head_start = 1.
  it_packing_list-head_num = 0.
  it_packing_list-body_start = 1.
  describe table it_message lines it_packing_list-body_num.
  it_packing_list-doc_type = 'RAW'.
  append it_packing_list.

* Add the recipients email address
  clear it_receivers.
  refresh it_receivers.
  it_receivers-receiver = p_email.
  it_receivers-rec_type = 'U'.
  append it_receivers.

* Call the FM to post the message to SAPMAIL
  call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
       exporting
            document_data              = gd_doc_data
            put_in_outbox              = 'X'
       importing
            sent_to_all                = gd_sent_all
       tables
            packing_list               = it_packing_list
            contents_txt               = it_message
            receivers                  = it_receivers
       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.

* Store function module return code
  gd_error = sy-subrc.

* Get it_receivers return code
  loop at it_receivers.
  endloop.
endform.                    " SEND_EMAIL_MESSAGE


*&amp;amp;---------------------------------------------------------------------
*&amp;amp;      Form  INITIATE_MAIL_EXECUTE_PROGRAM
*&amp;amp;---------------------------------------------------------------------
*       Instructs mail send program for SAPCONNECT to send email.
*----------------------------------------------------------------------

form initiate_mail_execute_program.
  wait up to 2 seconds.
  if gd_error eq 0.
      submit rsconn01 with mode = 'INT'
                    with output = 'X'
                    and return.
  endif.
endform.                  "INITIATE_MAIL_EXECUTE_PROGRAM
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And let us know if its working fine for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2005 10:32:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936361#M62058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-29T10:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936362#M62059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please post whole code if possible&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;i think you have to put select to get user's SMTP from USR6&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2005 11:39:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936362#M62059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-29T11:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936363#M62060</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; My problem is in FM for exporting parameter sender_address, if assign say "latha@in.ibm.com" it is working fine, if i assign say "Sysid+objid", iam getting errow while releasing using SOST &lt;/P&gt;&lt;P&gt;Tcode saying receipent not available...means i have to maintian sender address for this objid in RFC Destination....i have no issues about FM, only issue with exporting parameter sendr_address avilability...this my problem..i think now it is clear...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2005 11:49:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936363#M62060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-29T11:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936364#M62061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try SCOT for sending mails&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to configure SCOT , you can find thread on forum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i don't think it is problem with SOST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put watchpoint of smtp address&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2005 11:53:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936364#M62061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-29T11:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Email</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936365#M62062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;did your problem got solved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if yes then pls share what was problem and close thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2005 05:21:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-email/m-p/936365#M62062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-30T05:21:04Z</dc:date>
    </item>
  </channel>
</rss>

