Sending external mail using SO_NEW_DOCUMENT_ATT_SEND_API1

When i use this RFC by appending the internal table receiver with receiver: sapuser name and rec_type  B it triggers mail to the sap user login .But when i give external email address for receiver with rec_type 'U' it is not triggering any mail.Can anyone please tell me how to use this RFC in sending external mails??

I went back and you are right "INT" was not the REC_TYPE it was the COM_TYPE.
Sorry for any confusion caused.
However,
I suggest 2 more tests and then I give up and can not think about anything else.
Try:
#1
REC_TYPE = 'X'.
if it does not work.
#2
REC_TYPE = 'R'.
Hope that will do the trick. I was trying a lot when I had to get that working some time ago.
And surely the other colleagues point to something which must be setup as well. Transaction SCOT the SMTP settings.
Furthermore there could be another issue. I remember that I worked at a client who had turned off the send settings on their email server. So SAP finished everything and handed the emails on to a mail server. The mail server had a setting to block any emails from the development environment.
So that might be another cause of your issue.

Similar Messages

  • Lines Display when sending E-Mail using SO_NEW_DOCUMENT_ATT_SEND_API1

    Good Afternoon,
    I'm using the following code to send e-Mails:
      LOOP AT t_z3emailusr INTO w_z3emailusr.
        t_receivers-receiver = w_z3emailusr-email.
        t_receivers-rec_type = 'U'.
        t_receivers-express  = 'X'.
        APPEND t_receivers.
      ENDLOOP.
      MOVE text-003 TO t_mailtxt-line.
      APPEND t_mailtxt.
      CLEAR t_mailtxt-line.
      APPEND t_mailtxt.
      MOVE text-001 TO t_mailtxt-line.
      APPEND t_mailtxt.
      CLEAR t_mailtxt-line.
      APPEND t_mailtxt.
      LOOP AT t_apqi INTO w_apqi.
        MOVE w_apqi-groupid TO t_mailtxt-line.
        APPEND t_mailtxt.
      ENDLOOP.
      MOVE text-002 TO t_mailtxt-line.
      APPEND t_mailtxt.
      CLEAR t_mailtxt-line.
      APPEND t_mailtxt.
      MOVE text-003 TO t_mailtxt-line.
      APPEND t_mailtxt.
      MOVE text-004 TO t_mailtxt-line.
      APPEND t_mailtxt.
      CLEAR t_mailtxt.
      DESCRIBE TABLE t_mailtxt LINES mailtxt_size.
      MOVE text-000 TO t_doc_att-obj_descr.
      MOVE sy-langu TO t_doc_att-obj_langu.
      MOVE 'O'      TO t_doc_att-sensitivty.
      t_doc_att-doc_size = mailtxt_size * 255.
      CLEAR t_mailpack-transf_bin.
      MOVE 1 TO t_mailpack-head_start.
      CLEAR t_mailpack-head_num.
      MOVE 1            TO t_mailpack-body_start.
      MOVE mailtxt_size TO t_mailpack-body_num.
      MOVE 'HTM'        TO t_mailpack-doc_type.
      MOVE sy-langu     TO t_mailpack-obj_langu.
      APPEND t_mailpack.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = t_doc_att
          put_in_outbox              = 'X'
        TABLES
          packing_list               = t_mailpack
          contents_txt               = t_mailtxt
          receivers                  = t_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.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Everything is ok except for the text...
    Although i'm appending lines in t_mailtxt the text of the e-mail is continuous...
    How to display text with "line breaks"? Do i need to change the doc_type of t_mailpack?
    Regards,
    Pedro Gaspar

    Yes .. change the doc_type.

  • Error getting while sending the Mails using 'SO_NEW_DOCUMENT_ATT_SEND_API1'

    Hi ALL,
       I HAVE THE REQUIREMENT AS SEND A REPORT AS A MAIL. IAM USING FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' WHILE EXECUTING ITS NOT SHOWING ANY ERROR. BUT IAM NOT GETTING ANY MAIL. I CHECKED IN 'SOST' TCODE. THERE I SEE A MESSAGE LIKE 'CANNOT PROCESS THE MSG TYPE IN SAP SYSTEM'. PLS TELL ME THE WHAT IS THE PROBLE.

    Hi
    Please dont write in Capital letters, it considered as shouting. Hope you are aware of the forum rules.
    You can check if you have made anything wrong in coding by referring wiki link.
    [Sending Mails |http://wiki.sdn.sap.com/wiki/display/ABAP/SendingMails-HomePage]
    Regards
    Abhii

  • How to update the sent mail using SO_NEW_DOCUMENT_ATT_SEND_API1

    I have a requirement to update/ append the sent mail like a trail.Since i am sending mails using SO_NEW_DOCUMENT_ATT_SEND_API1, how can i update new contents to sent mails using this RFC???Please help me.

    you may have to store content of each time mail send then only, you can send with history.

  • Error in sending external mail

    hi ..
    while sending mail using BCS objects .... i am geting error
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    ....i too configured SCOT transaction wit port number 25 , mail host and also given the internet email id for mailing user....
    plz do help me ...

    This error occurs when you send a mail via the SMTP node and can have several causes:
    1. Default domain not set
    2. Default code page not set (only with multi-codepage systems)
    3. Code page not suitable for sending mail
    4. COMMIT WORK is missing (programming error)
    5. Workplace plug-in is missing
    Solution
    Activate the SAPconnect trace and resend the document if necessary. The next time the SAPconnect send job is running, search for the entries marked in red in the SAPconnect trace of the document. The applicable solutions, depending on these entries, are listed below:
    1. Default domain not set
    Trace entries:
    BCS->MIME_MESSAGE_GENERATE
    Sender Address Not Found 80
    SO_OBEJECT_MIME_GET
    No MIME Document Received. Error Code: SENDER_BCS
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    or
    SX_GENERATE_NDR
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    or:
    BCS->MIME_MESSAGE_GENERATE
    Error during MIME Flow Generation
    BCS->MIME_MESSAGE_GENERATE
    Error During Automatic Determinaton of Default Internet Domain
    SO_OBEJECT_MIME_GET
    No MIME Document Received. Error Code: MIME_BCS
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    or
    SX_GENERATE_NDR
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    Solution: In the SAPconnect Administration (transaction SCOT), you must set the domain of the SAP System (Settings --> Default Domain).
    2. Default code page not set (only with multi-codepage systems)
    Trace entries:
    CL_BCOM_MIME->GET_CODEPAGE
    Termination: Multi-Codepage Systems Not Supported
    SO_OBEJECT_MIME_GET
    No MIME Document Received. Error Code: MNA_DOC
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    or
    SX_GENERATE_NDR
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    Solution: In the SAPconnect Administration (transaction SCOT), you must specify a code page on the SMTP node.
    3. Code page not suitable for sending mail
    Trace entries:
    CL_BCOM_MIME->GET_CHARSET
    Termination: Charset Cannot Be Determined for SAP Code Page
    SO_OBEJECT_MIME_GET
    No MIME Document Received. Error Code: MNA_DOC
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    or
    SX_GENERATE_NDR
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    Solution: In the SAPconnect Administration (transaction SCOT), you must specify a code page (an entry is available in table TCP00A) that is suitable for sending mail on the SMTP node.
    4. COMMIT WORK is missing (programming error)
    Trace entries:
    SO_OBEJECT_MIME_GET
    No Send Order Exists -> Termination
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    Solution: See note 429427 for the correction.
    5. Configuration for the sending of Business Objects
    An attempt is made to send a document of type OBJ to an external recipient. This requires a conversion to TXT/HTML format, but the necessary modules are not configured correctly.
    Trace entries:
    SX_OBJECT_CONVERT_OBJ_HTM
    Converting Document Format from OBJ to TXT/HTML
    SO_OBEJECT_MIME_GET
    No MIME Document Received. Error Code: MNA_DOC
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    or
    SX_GENERATE_NDR
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    Solution:
    Please refer to Note 530932.
    1. You can refer to SAP Note 487754.
    2. Error in Sending External Mail
    3. Re: BWCCMS: send email if process chain fails?
    Hope this will solve your issue.
    Re: Send mails
    Re: SCOT Setup
    Reward points..

  • How to send external mails to the user

    Dears,
    How to send external mails to the user who creates the sales document (Quotation)
    Can you please suggest what modification required in the FM
    Thanks,
    pinky

    You can have a partner function like 'Created by' and use an exit to populate the User ID to this partner function(dont have the system right now but i think this can be done with standard partner detr. procedure also)
    Then, create an Output type for that Partner function with transmission medium as 'External Send'. You can use the standard SAP program to trigger the email. To send the actual email after the output is trigerred, the link connection has to be set up be BASIS but if you want to check, then goto SOST and see if the email got trigerred or not.

  • Send External mail with Attchment from SAP

    Hi All,
    OUR REQUIREMENT: We need to send EXTERNAL MAIL with ATTACHMENT(Excel) form SAP .
    We have developed a function module which converts the internal table data into Excel Format and sends it as an attachment to External Mail.
    ISSUE : But our issue is we are unable to open that document using GOOGLE DOCS Could any one help me how to do this.
    it was thriughing error like
    Error log is .
    ''Sorry, we are unable to generate a view of the document at this time. Please try again later.
    You can also try to download the original document by clicking here. Alternatively, you can view the plain HTML (automatically redirecting).
    Regards
    Venkat .
    Edited by: venkata pradeep on Mar 5, 2012 10:26 AM
    Edited by: venkata pradeep on Mar 5, 2012 10:28 AM

    Is the excel file recognized by MS Excel? If not, then issue is you have wrongly converted your attachment and/or your FM to create an excel file was wrongly coded or you have passed it wrongly to your mail code.
    If you consider an OOP approach in sending external mail, refer to this link:
    http://wiki.sdn.sap.com/wiki/display/Snippets/SendingmailwithattachmentusingObjectOriented+Approach

  • If I click on an e-mail address link in a web page instead of a blank message opening I always get a pop up screen with a log-in for googlemail. I do not have and do not want a googlemail account. I just want to be able to send e-mails using Outlook.

    If I click on an e-mail address link in a web page instead of a blank message opening I always get a pop up screen with a log-in for googlemail. I do not have and do not want a googlemail account. I just want to be able to send e-mails using Outlook.

    OUtlook was already set as the mail client for FF, and is my operating system (XP)'s default mail programme. therefore problem not solved at all. what I get whenever I follow a link in a webpage to send an e-mail is a little pop up window asking me to sign in to gmail or open an account. any other suggestions?

  • Unable to sending a mail using odisend mail

    Hi,
    i have a need to send a mail using odi send mail, i am using gmail server getting to send a mail, but it getting error like this
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. d19sm1563829ibh.8
         at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
         at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
         at javax.mail.Transport.send0(Transport.java:169)
         at javax.mail.Transport.send(Transport.java:99)
         at com.sunopsis.dwg.tools.SendMail.actionExecute(SendMail.java:220)
         at com.sunopsis.dwg.function.SnpsFunctionBase.execute(SnpsFunctionBase.java:276)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java:3430)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeOdiCommand(SnpSessTaskSql.java:1491)
         at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:32)
         at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:662)
    please share your opinions for this post
    Regards,
    901202

    http://www.oracle.com/technetwork/java/javamail/faq/index.html#starttls

  • Sending e-mail using utl_smtp on oracle 9i

    Hello
    I have problem with sending e-mails using utl_smtp package.
    My code looks like this:
    lv_mail_conn := utl_smtp.open_connection(lv_mailhost_txt);
    utl_smtp.ehlo(lv_mail_conn, lv_mailhost_txt);
    res :=     utl_smtp.command(lv_mail_conn, 'AUTH LOGIN');
    res := utl_smtp.command(lv_mail_conn, <login in base64>);
    res := utl_smtp.command(lv_mail_conn, <password in base64>);
    And I get en error after sending a password to SMTP server.
    Error code: 535, text: 5.7.3 Authentication unsuccessful.
    This happens on oracle 9i.
    I have another server for testing which has oracle 10g installed. This code works fine on oracle 10g but doesn't work on oracle 9i.
    Do you have any ideas what's wrong? I assume that SMTP server (microsoft exchange) work correctlys because I can send e-mail from test server.

    Ok problem solved :)
    Problem was between oracle and MS exchange server. Live server oracle 9i is on linux, and testing server works on windows.
    So the problem was with configuration. Our admins corrected it and now works :). I don't know details.

  • How to bypass proxy when trying to send a mail using javamail smtp

    Hi,
    I am trying to make a servlet send a mail using javamail smtp protocol on port 25 but i m not able to send getting an exception, i suspect proxy is blocking, so any idea anyone how bypass a proxy.

    And if it does turn out that there's a proxy server blocking access to your target SMTP server, the best way to deal with that is to discuss the issue with the person responsible for your network configuration.

  • How to send e-mail using PL/SQL

    I need to send e-mail using PL/SQL. Is it possible?
    Thanks in advance,
    Agnaldo

    Yes. Use the UTL_SMTP package

  • How to send External mail in sap HR workflow

    Hi experts,
         Anybody con tell me how  to send External mail in sap HR workflow ?
    Regards,
    Umesh.

    Hello,
    Check the workflow builder. There is a step type of "Send mail". Just put that into your workflow definition, and your workflow will send mail.
    Regards,
    Karri

  • Sending e-mail using Mail on a new AT&T modem

    Since installing a new AT&T (Motorola) DSL modem, I cannot send e-mail using Apple Mail. AT&T tells me that it is a known issue with Apple, and that they will put me on "the list" for Apple to contact me. Has anyone gotten any satisfaction on this issue? Thank you. 

    I have experience the same email-related problem on both my new MacBook Pro and my iPod Touch.
    - There are also times when I will start one or the other device and get a message on the screen that reads, in effect, that another device is using the connection and cannot connect the second. (I thought mutliple devices could use the connection at the same time as long as they had the router's password.)
    - In addition, the connection will frequently disconnect, and I have to restart the modem to reconnect.
    - I have recently installed an Apple Airport Express router (which works just fine), and subsequently had to replace the modem. That's when the troubles started.

  • Send a mail use FM 'so_object_send' with a Script form layout

    Hi,
    I try to send a mail use FM 'so_object_send', is it possible to use a sap script form for the layout?
    Please give more details....

    Hi,
    Did you debug and check this function module 'SO_NEW_DOCUMENT_SEND_API1' ?
    As you said its giving you a sy-subrc = 2, did you check at what stage it is giving you an error ?
    Also, Commit work = 'X' has nothing to do with this as you are getting an error of Sy-subrc = 2.
    Also, while debugging are you getting the email address fetched from database table ? If no, then the sender's email has not been maintained. You will have to maintain the sender's email in the user details in SU02 under Address tab.
    I would recommend you to go for BCS to send emails wherein you specify the sender email address directly in the program rather than adding email address in every user's logon details.
    Regards,
    Danish.
    Edited by: Danish2285 on Mar 5, 2012 3:28 PM

Maybe you are looking for

  • Premiere Pro keeps crashing when using overwrite (.) shortcut in Source Monitor

    When editing a clip in the source monitor and then using the (.) key to overwrite the clip onto my timeline Premiere Pro keeps crashing. If I select the Timeline window and then press the (.) key it works fine, but if the Source Monitor is highlighte

  • Year end closing - facing problem in dep area 55

    We have Chart of Depreciation as - SUSA Dep area 55 is derived from - 01 and 20 it is assigned to 4 company codes and when ever the posting triggered to Dep area 55, parallel posting will happen to company code 9010. so, I think due to parallel dep c

  • Error in uncarring INSENREP_#.SAR archive.

    Hi,    I downloaded the archive INSENREP_#.SAR from www.service.sap.com/swdc and tried to uncar it using sapcar.exe. I got the following error: error from sapcar.exe - E:\downloads\SAP\INSENREP\IA32bit>SAPCAR.exe -xvf INSENREP_2-20000182.SAR processi

  • Multiple selections to multiple layers or multiple files with one go ?

    Hi, how to convert multiple selections to multiple layers or multiple files with one go ? Thanks!

  • SOAP, servlets and others decisions?

    Hi? I?m developing a servlet application in an AS400 server which basically does some query in the DB In other web server (Apache, Linux), I have the web application which needs to request information in the AS400 DB. I was thinking to develop the co