Sending mail to Internet address from SAP system

Hi...
My requirement is to send a mail to an internet address say ABC@companyid from SAP.
I have used a FM So_New_Document_Send_API1 for the purpose.For this I have provided
             e_mailrec-receiver = w_emailid.
              e_mailrec-rec_type = 'U'.
              APPEND e_mailrec.
But I get an error msg in SOST, that the route from (SAP server) to (mail id) not found.
Instead of internet address when I give rec_type as B i.e. SAP USER it sends a mail to my SAP inbox.
I have also checked SAPConnect, and it is fine.
Is the above FM only for sending mails to SAP id, then wats the FM for sending mails to internet address? Its just sending a 1 line mail without attachment.
P.S: I have gone through search in sdn so please don't provide me with links to other threads.
Reply only if you can actually help and know wats this about.
Thnaks and Regards.

These are the FM for sending external email :-
SO_DOCUMENT_SEND_API1
Send new document with attachments via RFC
SO_NEW_DOCUMENT_ATT_SEND_API1
(In 4.6C only, You can go to SE37 and click the documentation on how to use it. A sample program is provided there.)
Send new document with attachments via RFC
Note : If you are using FM SO_NEW_DOCUMENT_ATT_SEND_API1 then Export Parameter DOCUMENT_DATA-OBJ_DESCR contains the Subject.
SO_NEW_DOCUMENT_SEND_API1
Send new document
For Code
http://www.forum.saptechies.com/viewtopic.php?t=5562

Similar Messages

  • Out of office message when sending mail to Lotus Notes from SAP

    Hi,
    Is it possible to have an 'out of office' message when sending mail to Lotus Notes from SAP?
    I'm sending account statements by mail via a modified version of function FI_OPT_ARCHIVE_CORRESPONDENCE. The SAP username is send as a parameter, and later converted to the e-mail saved in the user profile. This works, - but I would like to have an out of office reply if the user I send to is out of office.
    Hope someone can help...
    Regards,
    Lene

    As Thomas pointed out, you can use regular SMTP mail to send the contents to Lotus Notes. You can use the function module SO_OBJECT_SEND or any of the SAP Office function modules to do this.
    Only thing to remember is that the SMTP may have been disabled by your basis team due to security risks involved. An alternative could be a lotus notes connector available from IBM.
    Srinivas

  • Need help: Sending mail to internet address without commit work statement

    Dear Experts,
            I have a problem in sending mails from sap to internet address.Am using the function module
    SO_NEW_DOCUMENT_SEND_API1 and am passing parameters like,
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
         EXPORTING
              DOCUMENT_TYPE  = 'RAW'
              DOCUMENT_DATA  = DOC_CHNG
              PUT_IN_OUTBOX  = 'X'
         TABLES
              OBJECT_CONTENT = OBJCONT
              RECEIVERS      = RECLIST
         EXCEPTIONS
              TOO_MANY_RECEIVERS         = 1
              DOCUMENT_NOT_SENT          = 2
              OPERATION_NO_AUTHORIZATION = 4
              OTHERS                     = 99.
    submit rsconn01 with mode = 'INT'
                        with output = 'X'
                        and return.
    My problem here is,with the commit work statement after FM, the mail is triggering correctly.but if, am not using the commit work statement,at the very first time of execution mail is not triggering, and the second time of execution first mail is triggering like wise it is going.The status of the message is waiting in queue.
    i have refresh receiver's list also.I want to use this concept in badi.So anyone can pls help me,how to send a mail without commit work statement.
    Thanks in advance.

    There is a parameter Commit_Work pass it as 'X'
    <code>
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    EXPORTING
    DOCUMENT_TYPE = 'RAW'
    DOCUMENT_DATA = DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    commit_work = 'X'
    TABLES
    OBJECT_CONTENT = OBJCONT
    RECEIVERS = RECLIST
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    OPERATION_NO_AUTHORIZATION = 4
    OTHERS = 99.
    submit rsconn01 with mode = 'INT'
    with output = 'X'
    and return.
    </code>
    Edited by: Saravanan Ramasamy on Nov 11, 2009 1:31 PM

  • Sending Mail to Internet Address Maintained in Infotype 105

    Hi All,
    I have a requirement wherein I have to send mail to the Internet Address of the employee which is maintained in Infotype 0105. Now I have gone through the SDN where in they have said that using select or FM get the Employee details and pass it to a container which will be added in the Send Mail step. I have understood all this thing. But Since I am new to workflow Concepts. Can someone guide me where to write this peice of code to fetch email id from INfotype 0105 and how to get that value in a workflow container.
    If anyone has done this scenario , I will be very grateful if you can guide me step by step how to do it.
    I am an Abaper and understands ABAP OO and BOR Concepts very well.
    Regards,
    Akhil Rai

    I am an Abaper and understands ABAP OO and BOR Concepts very well.
    Createa a method in the BOR and impor the employee number for whom you need to determine the EMAIL ID by using the FM HR_READ_INFOTYPE pass the infotype as 0105 and subtype as 0010 to get the email Id.
    and once the email ID is determined then export the email back to workflow by using binding concept
    Pass the pernr from WORKFLOW  ---> TASK  ---> method container ( For importing into method )
    Pass any value METHOD ---> TASK ---> Workflow Container ( for exporting to workflow )..
    and if possible instead of using send mail step call the standrad FM and mention the address type as U external address and pass the email ID and content...

  • Unable to send mails to outlook from sap system through workflow

    Hi ,
    Iam unable to send mails to outlook from sap system through work flow .Actually we r able to send mails from sap inbox to outlook successfully.But when trying with workflow we r not able to send.Please guide me that is  there any configurations required from BASIS side for work flow.Actually we configured everything like default domain .
    Please find the errors belows that  traced from sost t code
    02/13/2012     17:50:12     0380 MIME_MESSAGE_GENERATE     G     Error when generating MIME flow
    02/13/2012     17:50:12     0382 MIME_MESSAGE_GENERATE     G     Required 'From' header is initial
    02/13/2012     17:50:12     0167 SO_OBJECT_MIME_GET     G     Error during MIME Generation
    02/13/2012     17:50:12     0777 UPDATE_SOSC     G     Cannot process message in SAP System
    Regards
    RAGHAVENADAR

    Hello,
    Actually i checked the mail ID for WF-BATCH  using su01 .But i didnt find any mail ID for WF-BATCH then i added the email address of the user.Then we tried sending mail it was successfull.
    But later i removed the email address what i entered in WF-BATCH user .Even after removing the email address also iam able to send the mails through workflow.
    So iam confused whether it needs an mail address or not.But now we are able to send a mail to outlook through work flow but not able to send mails to GMAILor yahoo.For that we need to do any settings.
    ABAPer is sending mails through work flow.
    Regards
    RAGHAVENDAR M

  • Sending mail to Internet or Sap office users id -required settings

    Hi All,
    Here I am having requirement that I need to send one mail format to email id of the employees. For this I have used FM .
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
            EXPORTING
            document_data = maildata
            document_type = 'RAW'
            put_in_outbox = 'X'
            commit_work = 'X'
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
            TABLES
       object_header = mailtxt
            object_content = mailtxt
    CONTENTS_HEX =
    OBJECT_PARA =
    OBJECT_PARB =
            receivers = mailrec
    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.
    But its not sending mail. It's giving error  the  ' DOCUMENT_NOT_SENT = 2'  due to connection error(final).
    Please let me know solution. Thanks for reading this and Verymuch thankful if you send any solution.
    Thanks&Regards,
    Prakash.

    Hi Prakash,
    firstly you should check that sending email messages works okay from SAP Office. If you can't send messages from there then you have no chance doing it from a program.
    Then, if you want to send email externally, you need to ensure the SMTP plug-in is properly configured. http://help.sap.com/saphelp_47x200/helpdata/en/af/73563c1e734f0fe10000000a114084/frameset.htm covers this.
    Then, yet again, ensure you can send messages to external recipients <b>and receive their replies</b> in SAP Office before trying to do it from a program.
    There are lots of weblogs and forum messages on sending email from ABAP. I very much prefer using the BCS Interface to do this. Check out one of Thomas's great web logs at /people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface
    Cheers
    Graham

  • Send IDOC from SAP system to IX but can't see any message in SXI_MONITOR

    Hi all,
    I have built up an XI system and configured an IDOC to IDOC scenario between two SAP Systems. After completed all configuration necessary:
    1. Configuration on Source Side (SAP System that send IDOC) and on Target Side (SAP System that receive IDOC) is OK.
    2. SLD is OK: Technical System and Business System are correct for these two SAP System.
    3. Integration Repository: all designed Object is OK.
    4. Integration Directory: all configuration is OK. "Test Configuration" Function is OK.
    5. Runtime WorkBench: is OK. "Test Message"  Function of "Integration Server" is OK.
    In general, it is all OK.
    But when i send an IDOC from SAP System Sour Side (Outbound IDOC from Source Side is OK), on the XI server i can't see any message in Tcode SXI_MONITOR. In this case, my XI server didn't receive any IDOC Message from  this Source Side, and so that my XI server can't process and exchange any IDOC sent from Source Side.
    Anyone can please help me to explain this problem: why my XI server can't receive any IDOC message from SAP System Source Side when all configuration is OK? Do anyone see the same case as this case?
    Thanks a lot for all in advance,
    Best regards,
    Vinh vo

    Hi,
    Possible checks
    At R/3 side
    1) Check in SMQ1 and SM58
    At XI Side
    1) Check in SMQ2 and IDX5
    Check this
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/e6194119d8f323e10000000a155106/frameset.htm
    Regards
    Seshagiri

  • QRFC/TRFC for sending idocs from SAP system to XI

    Hi experts,
    The standard program RFFOEDI1 generates payment orders - first PEXR2002 and then EUPEXR idocs. These idocs are to be sent to the bank from SAP through XI. Bank partner profile is maintained. But these idocs because of TRFC are not getting sent in the order in which they are generated by the SAP system. So I changed the bank partner profile settings from TRFC to QRFC and gave the rule name as first 16 of mes type. But the idocs are struck in the SAP system. Is there any standard program to be run to send the idocs out from SAP system or is it automatic.
    Please suggest a standard method which is to be followed to send the idocs in the same order in which they are getting generated for the scenairo above.
    Regards,
    Asha

    Hi Asha,
    As you said Idocs are stucking,
    To send Idocs to XI, you must have maintain some settings in XI to receive Idocs. Once they are done properly .in R3 side standard way to send idocs to XI is Maintaining<b> <i>Change Pointers</i></b> and shedule the programe to trigger that most of Standard idocs will have standard programs to catch change pointers and send them to external system.
    and to maintain the same order of idocs there is a setting called Quality Of Service in XI side ,that option should be set to Exactly Once In Order .
    Regards,
    Ramesh.

  • User couldn't recieve the mail from SAP SYSTEM

    Hi all experts,
    User couldn't recieve the mail from SAP SYSTEM since the Unicode changes were pushed ,
    how to fix the issue ?
    Thanks & Best regards,
    Michael

    Hi Michael,
    Is the SAPConnect configured as per note [455140|https://service.sap.com/sap/support/notes/455140] ?
    Since you are talking about receiving emails, do you see the emails in SOIN transaction (or report RSBCSIN)? Have you tried telnet directly to the SAPConnect plugin as described on note [607108|https://service.sap.com/sap/support/notes/607108]
    What is the value of parameter is/SMTP/virt_host_<*>?
    Regards,
    Tiago

  • Sending emails from SAP system

    Hai everybody,
    for sending emails from SAP system , what are all the configuration we have to made & what are all the cheks we have to perform at BASIS level .
    Pl guide me.
    Ramesh

    Hi,
    Configurations need to be done with Tcode : SCOT
    and RFC need to be established using SM59.
    SO_NEW_DOCUMENT_ATT_SEND_API1 is the Function Module used for sending Emails from SAP System.
    The Email ID's are maintained in XK02 , XD02 For Vendors and Customers in the Basic Data.
    You need to write the code to fetch the ID's from the Vendor Master dataor customer master data based on the Vendor/Customer Numbers.
    You can always monitor the Emails in SOST.
    This is all you need to do.

  • Mail the internet address when alert occured

    Hi,gurus:
       I want to mail the internet address after the alert trigger,but it throws exception "CL_SMTP_RESPONSE ESMTP " and the error "530 530 5.7.0 No AUTH command".I think it is the cause of the authentication of the mail server.What do you think of that? In the blog "FAQ in Business Communication area" I saw this problem:
    Q4. How does the R/3 System authenticate at the Mail Server.
    A4. The R/3 System can only use domain based authentication. Authentication with username + password is not possible. /* It is also not planned to implement this feature. */
    Workaround: You can install an additional SMTP hop, what only accepts mail from the SAP System, and sends these mails to your "productive" SMTP Server. /* With authentication */
    So is the problem the same to mine?
    I have configured relavant work in scot,sicf,su01...
    Any help will be appreciated!Thanks in advance.

    hi,
    check the below threads with same issue
    configuring SMTPPlugin for sending mail to Internet
    SCOT - error
    problem send email
    <removed by moderator>
    regards
    kummari
    Edited by: Mike Pokraka on Jul 24, 2008 1:00 PM

  • Restrictions from SAP Systems to the emails adding

    Gentlemen,
    Regarding SMTP Email Configuration, I already applied SAP Note u201C455140u201D and every thing its working fine, I can send email through SAP Systems no problem,
    My question is,
    There are no restrictions from SAP Systems to the emails as I can put any Emil in E-mail address in user ID properties and I can send with it without any problem and this is not logical,
    Please advice.
    Regards,
    Ahmed Saber

    Hi NALLAM GUNA RAN,
    First, thanks for fast reply
    Please can you explain in more details what you mean of XI/PI box,
    And whatu2019s the solution of this situation as itu2019s not accepted from customers.
    Regards,
    Ahmed Saber

  • Sending mail to external mailid from user exit EXIT_SAPLEBNF_005

    Hai ALL,
    iam facing problem with sending mail to external id from user exit exit_saplebnf_005 , this user exit for ROLE Determination of releasing of PO .
    in this user exit i passed a user name for this role from one z table.
    through workflow the mails are send to workplace of resposible person maintained in ztable.
    now user requirement is they want some intimation in their outlook for they got mail in workplace .
    can anybody help me.
    Thanks .
    sushmita.k

    they can either define automatic forwarding in their SAP office to external e-mail OR they can set their external e-mail as preferred method of communication and they should receive mail to their external mailbox assuming that sending to external mail is supported in your system (check with BASIS folks).

  • Aattach an existing Excel file to an email from SAP system.

    Hi,
    How can I attach an existing Excel file from SAP system (Example in 'DIR_TEMP' folder) & send a mail. Guess this requires a class with a method which picks up the file using the file path. Does CL_DOCUMENT_BCS provides this???? boz CL_DOCUMENT_BCS->ADD_DOCUMENT_AS_ATTACHMENT is for Add Existing Document as an Attachment,if so please let me know how with few lines of code??
    Thankx in advance.

    *  Local Data declarations
      DATA: ls_rec          TYPE somlreci1.
      DATA: lp_send_request    TYPE REF TO cl_bcs,
            lp_document        TYPE REF TO cl_document_bcs,
            lp_sender          TYPE REF TO if_sender_bcs,
            lp_recipient       TYPE REF TO if_recipient_bcs,
            lp_bcs_exception   TYPE REF TO cx_bcs.
      DATA: lt_text TYPE soli_tab,
            ls_text LIKE LINE OF lt_text,
            lv_flag.
      DATA: lt_tline TYPE TABLE OF tline.
      DATA lv_receiver TYPE ad_smtpadr.
    *  DATA lt_attach  TYPE soli_tab.
      DATA ls_tline TYPE tline.
      TRY.
    *   create persistent send request
          lp_send_request = cl_bcs=>create_persistent( ).
    * Get the text
          IF iv_stxt IS NOT INITIAL.
            CALL METHOD zfi_flexgl_common=>read_text
              EXPORTING
                iv_stxt   = iv_stxt
              IMPORTING
                et_tline  = lt_tline
                ev_failed = ev_failed.
            LOOP AT lt_tline INTO ls_tline.
              APPEND ls_tline-tdline TO lt_text.
            ENDLOOP.
          ENDIF.
    *  create and set document
    *     create document from internal table with text
          lp_document = cl_document_bcs=>create_document(
                          i_type    = iv_format_type   "'XLS' "HTM'
                          i_text    = lt_text
                          i_subject = iv_msg_subj ).
          IF it_attach IS NOT INITIAL.
    * Add attachment
    *        DATA:      l_size      TYPE sood-objlen,              " Size of Attachment
    *                   l_lines     TYPE i.                        " Lines count
    *        l_lines = LINES( it_attach ).
    *        l_size = l_lines * 255.
            CALL METHOD lp_document->add_attachment
              EXPORTING
                i_attachment_type    = 'RAW'
                i_attachment_subject = 'My attachment'
    *            i_attachment_size    = l_size
                i_att_content_text   = it_attach.
          ENDIF.
    *     add document to send request
          CALL METHOD lp_send_request->set_document( lp_document ).
    * Sender addess
    *l_sender = cl_sapuser_bcs=>create( sy-uname ).
    *call method l_send_request->set_sender
    *  exporting
    *    i_sender = l_sender.
    *      LOOP AT it_rec INTO ls_rec.
          lv_receiver = iv_rec.
          TRY.
              CALL METHOD cl_cam_address_bcs=>create_internet_address
                EXPORTING
                  i_address_string = lv_receiver
                RECEIVING
                  result           = lp_recipient.
            CATCH cx_address_bcs .
          ENDTRY.
          CALL METHOD lp_send_request->add_recipient
            EXPORTING
              i_recipient  = lp_recipient
              i_blind_copy = abap_true
              i_express    = abap_true.
    *      ENDLOOP.
          IF sy-subrc <> 0.
            ev_failed = abap_true.
            EXIT.
          ENDIF.
    *     ---------- send document ---------------------------------------
          CALL METHOD lp_send_request->send(
            RECEIVING
              result              = lv_flag ).
        CATCH cx_send_req_bcs.
          ev_failed = abap_true.
        CATCH cx_document_bcs.
          ev_failed = abap_true.
      ENDTRY.
      IF iv_commit = abap_true.
        COMMIT WORK.
      ENDIF.

  • How to consume a web service provided by third party system from SAP system

    Hi Friends,
    Could any of you provide me a clear picture on how to consume a web service from SAP system and is provided by a third party system?
    Do we get an URL to create a client proxy for consuming the web service?
    Thanx in advance,
    Ram

    Hi Ram,
    of course you cannot supply the WSDL URL. Inside the WSDL (just view it in your browser) you find (usually but not necessary) towards the end something like
    <soap:address location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"/>
    which is the actual adress of the service.
    An example service can be found here:
    <a href="http://www.weather.gov/xml/">National Digital Forecast Database</a>
    containing the WSDL URL at
    <a href="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">this address</a>.
    You might also want to browse for the amazon webservices which allow you to embed queries against amazon into your application.
    have fun,
    anton

Maybe you are looking for