Send Mail Functionality in Siebel.

Hi,
In our company the mail is maintained by Google, so we do not have mail server inside the company network. When we try to send mail using the Communication profile in Siebel which is configured with the SMTP information provided by Google. But the mail fails and it asks for SSL which is not installed in Siebel. The F9 functionality works fine with Microsoft Outlook. To send automatic mail using the Outbound communication manager does not work as it does not use the Outlook configuration. So now we are not able to send automatic mail. Kindly let me know is there any other possibility to send automatic mail.
Rgds
Vinoth.R

Hi Vinoth,
Can you explain what you mean by 'SSL is not configured in the Siebel Server'?
My understanding is that you don't have to have anything specific configured on the Siebel Server to permit the use of SSL in the connection to the external SMTP server. In the same way I use SSL in my Outlook connection to Googlemail without having to install anything specific on my PC.
Are you thinking about about the Strong Encryption Pack or something similar?
Have you tried setting the parameter anyway, just to see what happens?
Apologies if I'm wrong on this one - I've not used an external SMTP server before so really just trying to rack my brain to help you out with some suggestions.
Regards,
mroshaw

Similar Messages

  • Attach GOS attachments with a standard send mail functionality

    Hi Folks,
    I am here after long time and need your help.
    I have a requirement where I need to attach document with a standard send mail functionality.
    Below is the details:
    From Quality notification 'Action Box', if the user select a perticular action (it is similar to web link), the system is sending a mail to an external mail id provided by the user (In a popup). This mail send is happening through a SAP standard functionality.
    Now the requirement is, I need to attach selected file from GOS (generic Object Services) and attach them to the mail. Sending mail should happen through standard functionality.
    I want to know below two points:
    1) How to get selected files from GOS attachment?
    2) How to attach them to mail? (only attach, sending will be done by standard functionality)
    Hope I am clear with the requirement.
    Please help me to get it resolved.
    thanks,
    Surajit

    1st - analyse fm SO_ATTACHMENT_LIST_READ and table SOOD
    and function groups sgos* and SOB2
    hope that helps
    Andreas

  • The servlet include a send mail function,and can not retrun immediately!

    In the post/get funtion ,a send mail function is present,and this will make the client wait a long time to continue to browse,how to let it return as soon as possible?

    Not sure I understand your question, but I think you want to know how to handle a lengthly operation (send mail in your case) without making the client wait a long time for a response. If that is the question, you can kick off a new thread to handle the mail sending while replying to the browser client immediately. There's a good intro to threads and examples in the Jave tutorial (http://java.sun.com/docs/books/tutorial/essential/threads/index.html)

  • Sending mail function module problem in WAS.

    We have one custom function module Z_SEND_MAIL_ALL
    which is sending mails successfully with in the SAP 4.7 E system.
    Our function module Z_SEND_MAIL_ALL uses internally function modules like SO_OBJECT_SEND and SO_OBJECT_INSERT...
    Now we copied the same function module Z_SEND_MAIL_ALL into another system which is running in WAS server and
    when we run the function module it seems it is sending as attachment, however when I try to open the attachement...it gives dump. I clicked debugger.
    It shows  while CALL FUNCTION 'TABLE_DECOMPRESS' execution...
    it gives exception ( Error in compressed table ) as below  ...
    <b>raise COMPRESS_ERROR.</b>....
    I don't understand what is the problem ?
    Is it because of WAS is fully unicode compliance,  these function modules are not working . or is there any thing else I can do ....
    YOUR help is highly appreciated and respected.

    You have to declare the table using any specific type.
    The type table in the FM is generic so you can pass any type you need.
    For instance:
    TYPES: BEGIN OF ty_fields,
             fieldname LIKE dfies-fieldname,
           END OF ty_fields,
    TYPES: TY_T_GLU1              LIKE GLU1                     OCCURS 0,
           ty_t_fields            type ty_fields                occurs 0.
      DATA: lt_info_struct_fields TYPE ty_t_fields WITH HEADER LINE,
            lt_matching_fields    TYPE ty_t_fields WITH HEADER LINE.
        CALL FUNCTION 'AS_API_INFOSTRUC_FIND'
             EXPORTING
                  i_fieldcat         = ft_fieldcat-fieldcat
                  i_fields           = ft_fields_filled[]
             IMPORTING
                  e_infostruc        = lv_info_struct_name
                  e_all_fields       = lt_info_struct_fields[]
                  e_matching_fields  = lt_matching_fields[]
             EXCEPTIONS
                  no_infostruc_found = 1.

  • Cannot send a PDF with the Send Mail function

    Send PDF as document fails on Adobe Reader on Ubuntu Linux 12.04 LTS.  Send Link works.

    Its all working now! Clean install No migration. That was the ticket for me. All anomalies are Gone!!

  • Leopard Mail and Filemaker pro - "Send Mail" is s-l-o-w

    When I upgraded to Leopard, I began having a problem with the "Send Mail" function in Filemaker Pro, even after I upgraded to the latest version. Previously, sending mail with an attachment to 300 BCC addresses went very quickly - about 10 seconds. Since Leopard, I have begun seeing each address get loaded into the BCC line, an operation taking 20 minutes or more. Has anyone else seen this, and are there any suggestions on how to remedy it?

    You might try this.
    MAC Mail, for some reason, wants a DNS server setting in the network setup.
    Under System Preferences, go to Network and add your DNS numbers for your ISP Server. Get the right numbers from your ISP. I did a search for "DNS" on the ATT/YAHOO member web site.
    This fixes the slow checking and sending of mail....It also fixes problems where mail sends slow and may give Authentication errors.
    I spent many hours on this and finally the answer was posted on this forum.
    Public DNS servers are less likely to be changed. They have been tried and do work. Nobody knows why.
    For Public DNS servers look at.
    http://www.tech-faq.com/public-dns-servers.shtml

  • Oracle Send Mail Authentication

    Hi,
    After we transferred our mail system to office365 version i got below error.
    Do you know how to authenticate in the oracle send mail function.
    Also i send my html_email procedure.
    ERROR:
    html_email(
    p_to => '[email protected]',
    p_to2 => '[email protected]',
    p_to3 => '[email protected]',
    p_to4 => '[email protected]',
    p_to5 => '[email protected]',
    p_from => '[email protected]',
    p_subject => XYZ,
    p_text => '1',
    p_html => l_body,
    p_smtp_hostname => 'smtp.office365.com',
    p_smtp_portnum => '25');
    ORA-29279: SMTP error: 530 5.7.1 Client was not authenticated+
    MY HTML_EMAIL PROCEDURE:
    create or replace
    procedure html_email(
    p_to in varchar2,
    p_to2 in varchar2,
    p_to3 in varchar2,
    p_to4 in varchar2,
    p_to5 in varchar2,
    p_from in varchar2,
    p_subject in varchar2,
    p_text in varchar2 default null,
    p_html in varchar2 default null,
    p_smtp_hostname in varchar2,
    p_smtp_portnum in varchar2)
    is
    l_boundary varchar2(255) default 'a1b2c3d4e3f2g1';
    l_connection utl_smtp.connection;
    l_body_html clob := empty_clob; --This LOB will be the email message
    l_offset number;
    l_ammount number;
    l_temp varchar2(32767) default null;
    begin
    l_connection := utl_smtp.open_connection( p_smtp_hostname, p_smtp_portnum );
    utl_smtp.helo( l_connection, p_smtp_hostname );
    utl_smtp.mail( l_connection, p_from );
    utl_smtp.rcpt( l_connection, p_to );
    utl_smtp.rcpt( l_connection, p_to2 );
    utl_smtp.rcpt( l_connection, p_to3 );
    utl_smtp.rcpt( l_connection, p_to4 );
    utl_smtp.rcpt( l_connection, p_to5 );
    l_temp := l_temp || 'MIME-Version: 1.0' || chr(13) || chr(10);
    l_temp := l_temp || 'To: ' || p_to || chr(13) || chr(10) ;
    --||';'|| p_to2 || chr(13) || chr(10) ||';'|| p_to3 || chr(13) || chr(10) ||';'|| p_to4 || chr(13) || chr(10) ||';'|| p_to5 || chr(13) || chr(10) ||';'|| p_to6 || chr(13) || chr(10);
    l_temp := l_temp || 'To: ' || p_to2 || chr(13) || chr(10);
    l_temp := l_temp || 'To: ' || p_to3 || chr(13) || chr(10);
    l_temp := l_temp || 'To: ' || p_to4 || chr(13) || chr(10);
    l_temp := l_temp || 'To: ' || p_to5 || chr(13) || chr(10);
    l_temp := l_temp || 'From: ' || p_from || chr(13) || chr(10);
    l_temp := l_temp || 'Subject: ' || p_subject || chr(13) || chr(10);
    l_temp := l_temp || 'Reply-To: ' || p_from || chr(13) || chr(10);
    l_temp := l_temp || 'Content-Type: multipart/alternative; boundary=' ||
    chr(34) || l_boundary || chr(34) || chr(13) ||
    chr(10);
    -- Write the headers
    dbms_lob.createtemporary( l_body_html, false, 10 );
    dbms_lob.write(l_body_html,length(l_temp),1,l_temp);
    -- Write the text boundary
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    l_temp := '--' || l_boundary || chr(13)||chr(10);
    l_temp := l_temp || 'content-type: text/plain; charset=us-ascii' ||
    chr(13) || chr(10) || chr(13) || chr(10);
    dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
    -- Write the plain text portion of the email
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(p_text),l_offset,p_text);
    -- Write the HTML boundary
    l_temp := chr(13)||chr(10)||chr(13)||chr(10)||'--' || l_boundary ||
    chr(13) || chr(10);
    l_temp := l_temp || 'content-type: text/html;' ||
    chr(13) || chr(10) || chr(13) || chr(10);
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
    -- Write the HTML portion of the message
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(p_html),l_offset,p_html);
    -- Write the final html boundary
    l_temp := chr(13) || chr(10) || '--' || l_boundary || '--' || chr(13);
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
    -- Send the email in 1900 byte chunks to UTL_SMTP
    l_offset := 1;
    l_ammount := 1900;
    utl_smtp.open_data(l_connection);
    while l_offset < dbms_lob.getlength(l_body_html) loop
    utl_smtp.write_data(l_connection,
    dbms_lob.substr(l_body_html,l_ammount,l_offset));
    l_offset := l_offset + l_ammount ;
    l_ammount := least(1900,dbms_lob.getlength(l_body_html) - l_ammount);
    end loop;
    utl_smtp.close_data(l_connection);
    utl_smtp.quit( l_connection );
    dbms_lob.freetemporary(l_body_html);
    end;
    Edited by: user7987260 on Jun 2, 2013 6:25 AM

    What do you not understand, or what does not work for, with regards to the UTL_SMTP.AUTH function?

  • Workflow - Sending mail to Outlook

    Hi
    I am new to workflow and have some basic questions. I am working on 470 with WAS 620. I can currently send e-mail to Outlook without forwarding from SAP Inbox with the help of Send Mail functionality. In this case I can read outlook e-mail id of the user and send a mail with Send Mail functionality of Workflow.
    My SCOT transaction is configured to send e-mails outside SAP.
    Question:
    1. I was told that we can use agent assignment based on the Org structure and configure sending of e-mails based on a condition. Is this true?
    2. If 1 is true then can we use agent assignment and send e-mails to Outlook inbox directly i.e. with out forwarding mails from SAP Inbox to Outlook inbox.
    I have tried to find some solution.
    Based on the OSS Note: 627397.
    With WAS 620: It is no longer necessary to specify a forward address in the Business Workplace user settings in order to receive notifications.
    Instead user master record (transaction SU01) is always used to determine the e-mail addresses.
    Note with WAS 640: E-mail address can be read from the PD org structure (info type 1205) instead of user's master record (transaction SU01).
    Does that mean that I can still use agent assignment? If yes what is the difference the note is talking about between WAS 620 and 640. Do I need to do something special to read this mater record the note is talking about?
    Thanks for your replies in advance.
    Nani

    Thanks Shashank.
    You have mentioned that we can read user profiles and send e-mails with help of agent assignment. But, you have also mentioned that this is the case where HR is not implemented. So did you mean that where there is no Org Structure?
    In my case, we have HR implemented and we have an Org Structure. In the PO/PR release strategy we use Org Structure and Position to decide whom to send E-mail.
    Now what is it that I need to do differently to make sure that the E-mail is sent to Outlook directly not via SAP Inbox.
    Nani

  • Send mail alert

    Hi All, does anyone know how to send mail alert from windows box when oracle is down ?
    I have oracle 10.2.0.4 running on windows 2000 server and wanted to wrote a script in windows to detect if oracle is down, it will send mail alert to my mailbox.
    Is there any command line interface to call the send mail function in windows ?
    Pls advice how i can do this.
    Thanks.

    In order to send email within 10g you must install and set up the UTL_MAIL package.
    UTL_MAIL isn't installed when the database is installed because the SMTP_OUT_SERVER parameter must be configured. Listing 1 shows how to install UTL_MAIL and the results from the script. You must connect to the database as user SYS and run the two scripts identified in the listing.
    Listing 1. Installation of UTL_MAIL
    SQL> connect sys/password as sysdba
    Connected.
    SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
    Package created.
    Synonym created.
    SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
    Package body created.
    No errors. Next, the SMTP_OUT_SERVER parameter must be configured. You must connect to SYS and then use the alter system command to configure SMTP_OUT_SERVER parameter as shown here:
    SQL> alter system set smtp_out_server = '<ip-address:port' scope=Both;
    System altered.That's it! The installation and setup for UTL_MAIL is complete. The UTL_MAIL package only has one procedure, called Send, for sending email (see Listing 2 for the syntax for the Send procedure). This package bundles the email message and sends it to the UTL_SMTP package, and then the email message is sent to the SMTP server.
    Listing 2. Syntax for UTL_MAIL.SEND
    UTL_MAIL.SEND( sender IN VARCHAR2,
                                     recipients IN VARCHAR2,
                                    cc IN VARCHAR2 DEFAULT NULL,
                                    bcc IN VARCHAR2 DEFAULT NULL,
                                    subject IN VARCHAR2 DEFAULT NULL,
                                    message IN VARCHAR2,
                                    mime_type IN VARCHAR2 DEFAULT
                                    'text/plain; charset=us-ascii',
                                    priority IN PLS_INTEGER DEFAULT  NULL);
    Examples: I've created a database trigger that will send an email using UTL_MAIL (see Listing 3).
    Listing 3. Database shutdown using UTL_MAIL
    CREATE OR REPLACE TRIGGER SCOTT.db_shutdown
    before shutdown on database
    begin
    utl_mail.send(
       sender => '[email protected]',
       recipients => ' [email protected]',
       subject => 'Testing utl_mail',
       message => 'The receipt of this email means'||
        ' that shutting down the database'||
        ' works for UTL_MAIL '
    end;
    /

  • Multiple users in send mail step

    Hi,
    I have to pass mutiple users to send mail functionality to send UWL notification. These users belong todiff org units. Is there any option available in send mail step.
    Thanks
    Swamy

    Check teh binding of the task, it uses multiline element containers for addresses and for recipients etc.
    also check this link: http://www.sdn.sap.com/irj/scn/advancedsearch?query=multipleusersinsendmail+step
    then filter down on forum, then workflow.
    Edited by: Rob Dielemans on Sep 7, 2010 2:41 PM

  • Sending mails to UWL using SO_NEW_DOCUMENT_ATT_SEND_API1 function module

    Hi all,
    is it possible to view mails send using SO_NEW_DOCUMENT_ATT_SEND_API1 function module to UWL?
    I am receving emails in my SAP Inbox.
    Please guide.
    thanks.

    Hi,
    You can only get the SAP mails into UWL notification tab with the Sonic connector (well of course with some custom development everything is possible).
    One trick to get the workflow for sending "mails" to UWL is to NOT use email sending step, but instead use a decision step in the workflow and send this work item to the user. The decision step can include the same message as the email, and have onl one option "Confirm" (or whatever). These you can easily display in UWL since they are normal work items.
    Regards,
    Karri

  • Sending mail to all partner function in transaction

    Hi Folks,
    Standard action and condition sends mail to only main partner function in transaction. But transaction could have more than one partners for same partner function. Can mail be sent to all partners in transaction by using standard action configuration?
    Regards,
    Nikhil

    Hi Nikhil,
    You can control this using CRM_ACTION_BADI.
    Below the use of this BADI.
    In partner-dependent actions, business partners that occur in several functions, only the main partner remains.
    This can be useful, for example to avoid sending the same e-mail to the same business partner if there are several action definitions for different partner functions or function types.
    However, if several different actions have been defined as partner- dependent, this effect may not be required.
    In this case, the CRM_ACTION_BADI standard implementation can be deactivated. In this case, all partners from the transaction are considered during action determination.
    If this is also not required, a new implementation can be created.
    Hope this helps.
    Cheers, Satish

  • Function module to send mail????

    Hi,
    which function module can we use to send mail in ABAP online program , i dont want to attach any file, just i want to notify the users by writing few lines in the email body. can u help me out in this issue..
    Thanks & Regards,
    Harsha Ramaiah

    Hello,
    Check this sample report.
    REPORT ZV_SEND_MAIL .
    TABLES: EKKO.
    PARAMETERS: P_EMAIL   TYPE SOMLRECI1-RECEIVER
    TYPES: BEGIN OF T_EKPO,
      EBELN TYPE EKPO-EBELN,
      EBELP TYPE EKPO-EBELP,
      AEDAT TYPE EKPO-AEDAT,
      MATNR TYPE EKPO-MATNR,
      MENGE TYPE EKPO-MENGE,
    END OF T_EKPO.
    DATA: IT_EKPO TYPE STANDARD TABLE OF T_EKPO INITIAL SIZE 0,
          WA_EKPO TYPE T_EKPO.
    TYPES: BEGIN OF T_CHAREKPO,
      EBELN(10) TYPE C,
      EBELP(5)  TYPE C,
      AEDAT(8)  TYPE C,
      MATNR(18) TYPE C,
      MENGE(16)," LIKE EKPO-MENGE,
    END OF T_CHAREKPO.
    DATA: WA_CHAREKPO TYPE T_CHAREKPO.
    DATA:   IT_MESSAGE TYPE STANDARD TABLE OF SOLISTI1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   IT_ATTACH TYPE STANDARD TABLE OF SOLISTI1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   T_PACKING_LIST LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
            T_CONTENTS LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
            T_RECEIVERS LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
            T_ATTACHMENT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
            T_OBJECT_HEADER LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
            W_CNT TYPE I,
            W_SENT_ALL(1) TYPE C,
            W_DOC_DATA LIKE SODOCCHGI1,
            GD_ERROR    TYPE SY-SUBRC,
            GD_RECIEVER TYPE SY-SUBRC.
    *START_OF_SELECTION
    START-OF-SELECTION.
    *   Retrieve sample data from table ekpo
      PERFORM DATA_RETRIEVAL.
    *   Populate table with detaisl to be entered into .xls file
      PERFORM BUILD_XLS_DATA_TABLE.
    *END-OF-SELECTION
    END-OF-SELECTION.
    * Populate message body text
      PERFORM POPULATE_EMAIL_MESSAGE_BODY.
    * Send file by email as .xls speadsheet
      PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
                                   TABLES IT_MESSAGE
                                          IT_ATTACH
                                    USING P_EMAIL
                                          'Example .xls documnet attachment'
                                          'XLS'
                                          'filename'
                                 CHANGING GD_ERROR
                                          GD_RECIEVER.
    *   Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN EBELP AEDAT MATNR MENGE
    *   UP TO 10 ROWS
        FROM EKPO
        INTO CORRESPONDING FIELDS OF TABLE IT_EKPO.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_XLS_DATA_TABLE
    *       Build data table for .xls document
    FORM BUILD_XLS_DATA_TABLE.
      CONSTANTS: CON_CRET TYPE X VALUE '0D',  "OK for non Unicode
                 CON_TAB TYPE X VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
    *    con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    *    con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR' 'MENGE'
             INTO IT_ATTACH SEPARATED BY CON_TAB.
      CONCATENATE CON_CRET IT_ATTACH  INTO IT_ATTACH.
      APPEND  IT_ATTACH.
      LOOP AT IT_EKPO INTO WA_CHAREKPO.
        CONCATENATE WA_CHAREKPO-EBELN WA_CHAREKPO-EBELP
                    WA_CHAREKPO-AEDAT WA_CHAREKPO-MATNR
                    WA_CHAREKPO-MENGE
               INTO IT_ATTACH SEPARATED BY CON_TAB.
        CONCATENATE CON_CRET IT_ATTACH  INTO IT_ATTACH.
        APPEND  IT_ATTACH.
      ENDLOOP.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
    *       Send email
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES PIT_MESSAGE
                                              PIT_ATTACH
                                        USING P_EMAIL
                                              P_MTITLE
                                              P_FORMAT
                                              P_FILENAME
                                              P_ATTDESCRIPTION
                                              P_SENDER_ADDRESS
                                              P_SENDER_ADDRES_TYPE
                                     CHANGING P_ERROR
                                              P_RECIEVER.
      DATA: LD_ERROR    TYPE SY-SUBRC,
            LD_RECIEVER TYPE SY-SUBRC,
            LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
            LD_EMAIL LIKE  SOMLRECI1-RECEIVER,
            LD_FORMAT TYPE  SO_OBJ_TP ,
            LD_ATTDESCRIPTION TYPE  SO_OBJ_NAM ,
            LD_ATTFILENAME TYPE  SO_OBJ_DES ,
            LD_SENDER_ADDRESS LIKE  SOEXTRECI1-RECEIVER,
            LD_SENDER_ADDRESS_TYPE LIKE  SOEXTRECI1-ADR_TYP,
            LD_RECEIVER LIKE  SY-SUBRC.
      LD_EMAIL   = P_EMAIL.
      LD_MTITLE = P_MTITLE.
      LD_FORMAT              = P_FORMAT.
      LD_ATTDESCRIPTION      = P_ATTDESCRIPTION.
      LD_ATTFILENAME         = P_FILENAME.
      LD_SENDER_ADDRESS      = P_SENDER_ADDRESS.
      LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
    * Fill the document data.
      W_DOC_DATA-DOC_SIZE = 1.
    * Populate the subject/generic message attributes
      W_DOC_DATA-OBJ_LANGU = SY-LANGU.
      W_DOC_DATA-OBJ_NAME  = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
      W_DOC_DATA-SENSITIVTY = 'F'.
    * Fill the document data and get size of attachment
      CLEAR W_DOC_DATA.
      READ TABLE IT_ATTACH INDEX W_CNT.
      W_DOC_DATA-DOC_SIZE =
         ( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
      W_DOC_DATA-OBJ_LANGU  = SY-LANGU.
      W_DOC_DATA-OBJ_NAME   = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR  = LD_MTITLE.
      W_DOC_DATA-SENSITIVTY = 'F'.
      CLEAR T_ATTACHMENT.
      REFRESH T_ATTACHMENT.
      T_ATTACHMENT[] = PIT_ATTACH[].
    * Describe the body of the message
      CLEAR T_PACKING_LIST.
      REFRESH T_PACKING_LIST.
      T_PACKING_LIST-TRANSF_BIN = SPACE.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM = 0.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE = 'RAW'.
      APPEND T_PACKING_LIST.
    * Create attachment notification
      T_PACKING_LIST-TRANSF_BIN = 'X'.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM   = 1.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE   =  LD_FORMAT.
      T_PACKING_LIST-OBJ_DESCR  =  LD_ATTDESCRIPTION.
      T_PACKING_LIST-OBJ_NAME   =  LD_ATTFILENAME.
      T_PACKING_LIST-DOC_SIZE   =  T_PACKING_LIST-BODY_NUM * 255.
      APPEND T_PACKING_LIST.
    * Add the recipients email address
      CLEAR T_RECEIVERS.
      REFRESH T_RECEIVERS.
      T_RECEIVERS-RECEIVER = LD_EMAIL.
      T_RECEIVERS-REC_TYPE = 'U'.
      T_RECEIVERS-COM_TYPE = 'INT'.
      T_RECEIVERS-NOTIF_DEL = 'X'.
      T_RECEIVERS-NOTIF_NDEL = 'X'.
      APPEND T_RECEIVERS.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = W_DOC_DATA
                PUT_IN_OUTBOX              = 'X'
                SENDER_ADDRESS             = LD_SENDER_ADDRESS
                SENDER_ADDRESS_TYPE        = LD_SENDER_ADDRESS_TYPE
                COMMIT_WORK                = 'X'
           IMPORTING
                SENT_TO_ALL                = W_SENT_ALL
           TABLES
                PACKING_LIST               = T_PACKING_LIST
                CONTENTS_BIN               = T_ATTACHMENT
                CONTENTS_TXT               = IT_MESSAGE
                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.
    * Populate zerror return code
      LD_ERROR = SY-SUBRC.
    * Populate zreceiver return code
      LOOP AT T_RECEIVERS.
        LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
      ENDLOOP.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
    *       Instructs mail send program for SAPCONNECT to send email.
    FORM INITIATE_MAIL_EXECUTE_PROGRAM.
      WAIT UP TO 2 SECONDS.
      SUBMIT RSCONN01 WITH MODE = 'INT'
                    WITH OUTPUT = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
    *        Populate message body text
    FORM POPULATE_EMAIL_MESSAGE_BODY.
      REFRESH IT_MESSAGE.
      IT_MESSAGE = 'Please find attached a list test ekpo records'.
      APPEND IT_MESSAGE.
    ENDFORM.                    " POPULATE_EMAIL_MESSAGE_BODY
    Cheers,
    Vasanth

  • Function module to send mail from SAP

    Can any one please tell the Function module to send mail from SAP. The scenario is like this,I have a file in local system that i have to send to a particular mail address like [email protected] through a report program.

    Hi shafiq,
    1. There is some trick involved
    in the binary files.
    2. I have made a program (and it works fantastic)
    ONLY 6 LINES FOR EMAILING
    BELIEVE ME
    ITS A FANTASTIC PROGRAM.
    IT WILL WORK LIKE OUTLOOK EXPRESS !
    3. The user is provided with
    a) file name
    b) email address to send mail
    and it sends ANY FILE (.xls,.pdf .xyz..)
    Instantaneously !
    4. Make two things first :
    1. Include with the name : ZAMI_INCLFOR_MAIL
    2. Report with the name : ZAM_TEMP147 (any name will do)
    3. Activate both and execute (2)
    4. After providing filename, email adress
    5. Code for Include :
    10.08.2005 Amit M - Created
    Include For Mail (First Req F16)
    Modification Log
    Data
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    FORM
    FORM ml_customize USING objname objdesc.
    Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    Header Data
    Already Done Thru FM
    Main Text
    Already Done Thru FM
    Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    Receiver List
    Already done thru fm
    ENDFORM. "ml_prepare
    FORM
    FORM ml_dosend.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    CONTENTS_HEX = objhex
    OBJECT_PARA =
    object_parb =
    receivers = reclist
    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 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    CODE FOR PROGRAM
    5.
    REPORT zam_temp147 .
    INCLUDE zami_inclfor_mail.
    DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case.
    PARAMETERS : p_file LIKE rlgrap-filename
    OBLIGATORY.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    FORM
    FORM upl.
    file_name = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    EXTENSION = extension
    NAME = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    regards,
    amit m.

  • Send mail using CL_BCS through function module, run in background task.

    Hi,
    I am running a function module in Background task. in this function module I am sending mail using CL_BCS class.
    but mail is not generated. if I run the same function Module in foreground mail generated successfully....
    can anyone please tell me the reason behind this.

    Hi i realise that The LIST_TO_ASCII thing is not working correctly in background because the the list-processing in beckground is working not the same as in dialog i think.
    I can only get the last page of the list out when running in background. Any solution to this?
    my code:
        CALL FUNCTION 'LIST_TO_ASCI'
             EXPORTING
                  list_index         = sy-lsind
             TABLES
                 list_dyn_ascii = downtab
             EXCEPTIONS
                  empty_list         = 1
                  list_index_invalid = 2
                  OTHERS             = 3.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
    Thanks ,
    LH

Maybe you are looking for

  • Meu computador é um Itautec antigo menor de 1G dá para atualizar o Firefox?

    Meu computador Itautec tem um espaço livre de 66,2 GB e um tamanho total de 74,5 GB. Uso 0 Windows XP, e o Firefox de uma versão bem antiga, gostaria de saber se a atualização é possível.

  • Getting two values from a vector

    Hello I have a string which when i print it out i get these values. hello hello hello hello hello hello hello bye bye bye and i want to be able to print out just one of each word hello ben How can i do this with using a vector? thanks bobby

  • Iphone 3.0 Update with Carrier Update After?

    I just updated to Iphone 3.0 and now I see that there is an update for Carrier Settings? should I do it? Im on the Fidos/Rogers network...

  • STRUCTURES of LOGICAL DATABASE?

    STRUCTURES of LOGICAL DATABASE? please explain

  • Trying to find a file...

    Hi I�m trying to read a file from a JSP page using a Java class. When I pass the folder and the file to the method of the class, I try to verify that exists the Folder and later that exists the file, but I have not any result (the method returns null