<?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: Function module for sending EMAIL with TEXT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247652#M1212428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;just use this FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO_NEW_DOCUMENT_SEND_API1 - Sends emails with texts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Feb 2009 12:23:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-17T12:23:05Z</dc:date>
    <item>
      <title>Function module for sending EMAIL with TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247648#M1212424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I have a requirement  to send e-mail with text and receipient in CC and TO  along with SUBJECT.&lt;/P&gt;&lt;P&gt;I will be thankful if anybody can get me a sampl eocde for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 11:53:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247648#M1212424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T11:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for sending EMAIL with TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247649#M1212425</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;Have u checked with SO_NEW_DOCUMENT_SEND_API1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Neelima.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 11:56:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247649#M1212425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T11:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for sending EMAIL with TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247650#M1212426</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;Refer this FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_SMTP_SENDMAIL'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;         msg_header       = gs_msg_head&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FROM_STR         = '.'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_COMMIT         = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;         zmsg_text        = gt_msg_txt&lt;/P&gt;&lt;P&gt;     zcc_array        = gt_cc_array&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ZBCC_ARRAY       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     zto_array        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      smtp_error       = 1&lt;/P&gt;&lt;P&gt;      OTHERS           = 2&lt;/P&gt;&lt;P&gt;               .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 11:57:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247650#M1212426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T11:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for sending EMAIL with TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247651#M1212427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sanu,&lt;/P&gt;&lt;P&gt;Please Find the Sample Code Below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: psubject(40) type c default  u2018Hellou2019,&lt;/P&gt;&lt;P&gt;p_email(40)   type c default 'give the email address here' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:   it_packing_list like sopcklsti1 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;it_contents like solisti1 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;it_receivers like somlreci1 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;it_attachment like solisti1 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;gd_cnt type i,&lt;/P&gt;&lt;P&gt;gd_sent_all(1) type c,&lt;/P&gt;&lt;P&gt;gd_doc_data like sodocchgi1,&lt;/P&gt;&lt;P&gt;gd_error type sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:   it_message type standard table of SOLISTI1 initial size 0&lt;/P&gt;&lt;P&gt;with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform populate_message_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Send email message, although is not sent from SAP until mail send&lt;/P&gt;&lt;P&gt;*program has been executed(rsconn01)&lt;/P&gt;&lt;P&gt;PERFORM send_email_message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Instructs mail send program for SAPCONNECT to send email(rsconn01)&lt;/P&gt;&lt;P&gt;perform initiate_mail_execute_program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  POPULATE_MESSAGE_TABLE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Adds text to email text table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;form populate_message_table.&lt;/P&gt;&lt;P&gt;Append u2018Email line 1u2032 to it_message.&lt;/P&gt;&lt;P&gt;Append u2018Email line 2u2032 to it_message.&lt;/P&gt;&lt;P&gt;Append u2018Email line 3u2032 to it_message.&lt;/P&gt;&lt;P&gt;Append u2018Email line 4u2032 to it_message.&lt;/P&gt;&lt;P&gt;endform.                    u201D POPULATE_MESSAGE_TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  SEND_EMAIL_MESSAGE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Send email message&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;form send_email_message.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill the document data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gd_doc_data-doc_size = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the subject/generic message attributes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gd_doc_data-obj_langu = sy-langu.&lt;/P&gt;&lt;P&gt;gd_doc_data-obj_name  = u2018SAPRPTu2019.&lt;/P&gt;&lt;P&gt;gd_doc_data-obj_descr = psubject.&lt;/P&gt;&lt;P&gt;gd_doc_data-sensitivty = u2018Fu2019.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Describe the body of the message&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear it_packing_list.&lt;/P&gt;&lt;P&gt;refresh it_packing_list.&lt;/P&gt;&lt;P&gt;it_packing_list-transf_bin = space.&lt;/P&gt;&lt;P&gt;it_packing_list-head_start = 1.&lt;/P&gt;&lt;P&gt;it_packing_list-head_num = 0.&lt;/P&gt;&lt;P&gt;it_packing_list-body_start = 1.&lt;/P&gt;&lt;P&gt;describe table it_message lines it_packing_list-body_num.&lt;/P&gt;&lt;P&gt;it_packing_list-doc_type = u2018RAWu2019.&lt;/P&gt;&lt;P&gt;append it_packing_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add the recipients email address&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear it_receivers.&lt;/P&gt;&lt;P&gt;refresh it_receivers.&lt;/P&gt;&lt;P&gt;it_receivers-receiver = p_email.&lt;/P&gt;&lt;P&gt;it_receivers-rec_type = u2018Uu2019.&lt;/P&gt;&lt;P&gt;it_receivers-com_type = u2018INTu2019.&lt;/P&gt;&lt;P&gt;it_receivers-notif_del = u2018Xu2019.&lt;/P&gt;&lt;P&gt;it_receivers-notif_ndel = u2018Xu2019.&lt;/P&gt;&lt;P&gt;append it_receivers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the FM to post the message to SAPMAIL&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function u2018SO_NEW_DOCUMENT_ATT_SEND_API1u2032&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;document_data              = gd_doc_data&lt;/P&gt;&lt;P&gt;put_in_outbox              = u2018Xu2019&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;sent_to_all                = gd_sent_all&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;packing_list               = it_packing_list&lt;/P&gt;&lt;P&gt;contents_txt               = it_message&lt;/P&gt;&lt;P&gt;receivers                  = it_receivers&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;too_many_receivers         = 1&lt;/P&gt;&lt;P&gt;document_not_sent          = 2&lt;/P&gt;&lt;P&gt;document_type_not_exist    = 3&lt;/P&gt;&lt;P&gt;operation_no_authorization = 4&lt;/P&gt;&lt;P&gt;parameter_error            = 5&lt;/P&gt;&lt;P&gt;x_error                    = 6&lt;/P&gt;&lt;P&gt;enqueue_error              = 7&lt;/P&gt;&lt;P&gt;others                     = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Store function module return code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gd_error = sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get it_receivers return code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at it_receivers.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endform.                    u201D SEND_EMAIL_MESSAGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  INITIATE_MAIL_EXECUTE_PROGRAM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Instructs mail send program for SAPCONNECT to send email.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;form initiate_mail_execute_program.&lt;/P&gt;&lt;P&gt;wait up to 2 seconds.&lt;/P&gt;&lt;P&gt;if gd_error eq 0.&lt;/P&gt;&lt;P&gt;submit rsconn01 with mode = u2018INTu2019&lt;/P&gt;&lt;P&gt;with output = u2018Xu2019&lt;/P&gt;&lt;P&gt;and return.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endform.                    u201D INITIATE_MAIL_EXECUTE_PROGRAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be Helpful&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 11:58:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247651#M1212427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T11:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for sending EMAIL with TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247652#M1212428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;just use this FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO_NEW_DOCUMENT_SEND_API1 - Sends emails with texts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 12:23:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-sending-email-with-text/m-p/5247652#M1212428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-17T12:23:05Z</dc:date>
    </item>
  </channel>
</rss>

