ERROR WHILE SENDING REPORT THROUGH EMAIL .....

DEAR ALL
i have one problem . i am trying to send my report through e-mail.i am working with forms 5.0 and report 3.0 . i am calling report from form.when a client click on the button a report will be generated and this will be send to a specific person in a specific format either in html or pdf.
but when i click on button it initialize the report and gives the error
rep-4201 : error occured while initialize the mail subsystem.
rep-4220 : there is a problem with the mail subsystem.
if anyone of u have the solution for this please send to me.it will be very much helpfull if you send me the code.
thanks in adv.
D prasad.
null

well you will have to configure a default mail client on your machine. you can do this by going to control panel->mail in windows os.
you might also need a .dll file mapi*.dll something. you will need this .dll file in your client machine.
best of luck

Similar Messages

  • ERROR WHILE RUNNING REPORT THROUGH FORMS.....!

    hi all,
    ive designed one form in Forms 9i...I'm tryin to run report through a Push button .....report is running well in paper layout through report builder 9i...The problem I'm facing is dat when i pressed button it is giving me error initially as FRM-41214 cannot run report and after that FRM-40735 When button pressed unhandled exception ora-06502.....What could go wrong??... Ive started OC4J instance ....created report object in object nevigator as well and defined basic properties for diff.parameters HTMLCSS,CACHE..etc.,mentioned report path in complete i.e.c:\reports\genbill.rdf ...Can anybody help me out ??? Thnx.!
    -----------------------CODE ON BUTTON----------------------------------
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    BEGIN
    repid := FIND_REPORT_OBJECT('REPORT5');
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    /*Display report in the browser*/
    WEB.SHOW_DOCUMENT('<HOSTNAME>:8889/reports/rwservlet/getjobid'||
    substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=myrepserver','_blank');
    ELSE
    message('Error when running report');
    END IF;
    PAUSE;
    END;

    When a report terminates with an error, REPORT_OBJECT_STATUS returns the value "TERMINATED_WITH_ERROR", which is 21 bytes of data, but rep_status is defined as 20 bytes. The 6502 error is due to the data not fitting the variable.
    I recommend wrapping the REPORT_OBJECT_STATUS function with a SUBSTR that limits the data returned to 20 bytes, which will ensure the results fit.
    For example:
    rep_status := SUBSTR(REPORT_OBJECT_STATUS(v_rep), 1, 20);

  • Error while sending mail through SMTP

    Hi,
      We are getting the following error while trying to send mail through SMTP.
    '554 ERROR_MESSAGE_STATE: SMTP_NO_HANDLER( host:1-,subrc:0001)'
    Please advice,
    Regards,
    Sam

    Hi All,
      Configured SMTP as per the note 455140,i can able to send mails from SAP to the out side world,
    mails in SAP.When i tried the test to check whether the SAP system is correctly set up to receive e-mails as per the note 607108, iam getting a connection closed message as below.                                                                           
    afgdev:pgdadm> telnet afgdev 2500                                          
    Trying...                                                                  
    Connected to afgdev.                                                       
    Escape character is '^]'.                                                  
    220 afgdev.abc.ae SAP 6.40(52) ESMTP service ready                   
    helo afgdev                                                                
    250 afgdev.abc.ae                                                    
    mail from:<[email protected]>                                      
    250 Ok                                                                     
    rcpt to:<[email protected]>                                 
    250 Ok                                                                     
    data                                                                       
    354 Enter mail, end with "."                                               
    Hello,This is a test.                                                      
    Connection closed.                                                         
    afgdev:pgdadm> 
    rgds
    Sam

  • Error while generating Report through XL Reporter.

    Hello..
    I am using microsoft excel 2003.I have installed XL Reporter 2005SP1. While i am trying to generate report throgh excel reporter i get the following error.
    Security setting in microsoft excel prohibit XL Reporter from running.
    For more information click Help.
    I also tried by making security level low in microsoft excel -->Tools > Macros> Security.But still problem there.
    Thanks,
    Arpit

    Hi Arpit,
    As well as setting the macro security to Medium or lower, you need to tick the options 'Trust all installed add-ins and templates' and 'Trust access to Visual Basic Projects'. These options appear at the bottom of the Trusted Publishers tab in the Macro Security window.
    Hope this helps,
    Owen

  • Getting error while sending mail through javamail api

    I can able to compile the following code successfully but while executing it showing the error
    C:\Program Files\Java\javamail-1.4\demo>java msgsend -o [email protected] -M 203.112.158.188 [email protected]
    Exception in thread "main" java.lang.NoClassDefFoundError: msgsend
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class msgsend {
    public static void main(String[] argv) {
         String to, subject = null, from = null,
              cc = null, bcc = null, url = null;
         String mailhost = "null";
         String mailer = "msgsend";
         String file = null;
         String protocol = null, host = null, user = null, password = null;
         String record = null;     // name of folder in which to record mail
         boolean debug = false;
         BufferedReader in =
                   new BufferedReader(new InputStreamReader(System.in));
         int optind;
         for (optind = 0; optind < argv.length; optind++) {
         if (argv[optind].equals("-T")) {
              protocol = argv[++optind];
         } else if (argv[optind].equals("-H")) {
              host = argv[++optind];
         } else if (argv[optind].equals("-U")) {
              user = argv[++optind];
         } else if (argv[optind].equals("-P")) {
              password = argv[++optind];
         } else if (argv[optind].equals("-M")) {
              mailhost = argv[++optind];
         } else if (argv[optind].equals("-f")) {
              record = argv[++optind];
         } else if (argv[optind].equals("-a")) {
              file = argv[++optind];
         } else if (argv[optind].equals("-s")) {
              subject = argv[++optind];
         } else if (argv[optind].equals("-o")) { // originator
              from = argv[++optind];
         } else if (argv[optind].equals("-c")) {
              cc = argv[++optind];
         } else if (argv[optind].equals("-b")) {
              bcc = argv[++optind];
         } else if (argv[optind].equals("-L")) {
              url = argv[++optind];
         } else if (argv[optind].equals("-d")) {
              debug = true;
         } else if (argv[optind].equals("--")) {
              optind++;
              break;
         } else if (argv[optind].startsWith("-")) {
              System.out.println(
    "Usage: msgsend [[-L store-url] | [-T prot] [-H host] [-U user] [-P passwd]]");
              System.out.println(
    "\t[-s subject] [-o from-address] [-c cc-addresses] [-b bcc-addresses]");
              System.out.println(
    "\t[-f record-mailbox] [-M transport-host] [-a attach-file] [-d] [address]");
              System.exit(1);
         } else {
              break;
         try {
         if (optind < argv.length) {
              // XXX - concatenate all remaining arguments
              to = argv[optind];
              System.out.println("To: " + to);
         } else {
              System.out.print("To: ");
              System.out.flush();
              to = in.readLine();
         if (subject == null) {
              System.out.print("Subject: ");
              System.out.flush();
              subject = in.readLine();
         } else {
              System.out.println("Subject: " + subject);
         Properties props = System.getProperties();
         // XXX - could use Session.getTransport() and Transport.connect()
         // XXX - assume we're using SMTP
         if (mailhost != null)
              props.put("mail.smtp.host", mailhost);
         // Get a Session object
         Session session = Session.getInstance(props, null);
         if (debug)
              session.setDebug(true);
         // construct the message
         Message msg = new MimeMessage(session);
         if (from != null)
              msg.setFrom(new InternetAddress(from));
         else
              msg.setFrom();
         msg.setRecipients(Message.RecipientType.TO,
                             InternetAddress.parse(to, false));
         if (cc != null)
              msg.setRecipients(Message.RecipientType.CC,
                             InternetAddress.parse(cc, false));
         if (bcc != null)
              msg.setRecipients(Message.RecipientType.BCC,
                             InternetAddress.parse(bcc, false));
         msg.setSubject(subject);
         String text = collect(in);
         if (file != null) {
              // Attach the specified file.
              // We need a multipart message to hold the attachment.
              MimeBodyPart mbp1 = new MimeBodyPart();
              mbp1.setText(text);
              MimeBodyPart mbp2 = new MimeBodyPart();
              mbp2.attachFile(file);
              MimeMultipart mp = new MimeMultipart();
              mp.addBodyPart(mbp1);
              mp.addBodyPart(mbp2);
              msg.setContent(mp);
         } else {
              // If the desired charset is known, you can use
              // setText(text, charset)
              msg.setText(text);
         msg.setHeader("X-Mailer", mailer);
         msg.setSentDate(new Date());
         // send the thing off
         Transport.send(msg);
         System.out.println("\nMail was sent successfully.");
         // Keep a copy, if requested.
         if (record != null) {
              // Get a Store object
              Store store = null;
              if (url != null) {
              URLName urln = new URLName(url);
              store = session.getStore(urln);
              store.connect();
              } else {
              if (protocol != null)          
                   store = session.getStore(protocol);
              else
                   store = session.getStore();
              // Connect
              if (host != null || user != null || password != null)
                   store.connect(host, user, password);
              else
                   store.connect();
              // Get record Folder. Create if it does not exist.
              Folder folder = store.getFolder(record);
              if (folder == null) {
              System.err.println("Can't get record folder.");
              System.exit(1);
              if (!folder.exists())
              folder.create(Folder.HOLDS_MESSAGES);
              Message[] msgs = new Message[1];
              msgs[0] = msg;
              folder.appendMessages(msgs);
              System.out.println("Mail was recorded successfully.");
         } catch (Exception e) {
         e.printStackTrace();
    public static String collect(BufferedReader in) throws IOException {
         String line;
         StringBuffer sb = new StringBuffer();
         while ((line = in.readLine()) != null) {
         sb.append(line);
         sb.append("\n");
         return sb.toString();
    So please help me to resolve that error.

    The directory that contains msgsend.class (usually the current directory)
    is not in your CLASSPATH setting. Be sure that "." is included as one of the
    entries in CLASSPATH.

  • Error while caling report through form

    Hi,
    could someone help with my reports. I am using report 2.5 (old version)
    I have created a form that calls my report
    Plese find below command that I execute in my pushbutton
    DECLARE
    pl_id ParamList;
    BEGIN
    pl_id := Get_Parameter_List('tempdata');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List(pl_id);
    END IF;
    Add_Parameter(pl_id, 'MAXIMIZE', 'TEXT_PARAMETER', 'YES');
    Run_Product(REPORTS,'d:\cadv\Reports\D_Boking.RDF', SYNCHRONOUS,
    RUNTIME, FILESYSTEM,PL_ID,NULL);
    end;
    I get an error FRM-40735 When Button Pressed trigger raised unhandled exception ORA-06502
    If I remove add_parameter from my script it works fine.
    Basicaly I want to maximize my report when it is called from form
    thanks
    saaz

    Hi again!
    declare
    pl_id ParamList := Get_Parameter_List( 'tempdata' );
    begin
    IF
      NOT Id_Null( pl_id )
    THEN
      Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := create_parameter_list ( 'tempdata' );
    Add_Parameter( pl_id, 'MAXIMIZE', TEXT_PARAMETER, 'YES' );
    Run_Product( REPORTS,'d:\cadv\Reports\D_Boking.RDF', SYNCHRONOUS, RUNTIME, FILESYSTEM, PL_ID, NULL );
    end;Regards

  • Getting error while calling reports through form

    Hi I want to call a report from a form i put the following code on when-button-pressed but i am getting the following error.I can generate and run the reports.The object REPORTS is created under forms report object
    FRM-41211: Integration error: SSL Failure running another report
    DECLARE
    repid REPORT_OBJECT;
    report_prop VARCHAR2(20);
    v_rep VARCHAR2(100);
    BEGIN
    repid := find_report_object('REPORTS');
    set_report_object_property(repid,report_other,'p1=15 p2=19 paramform=yes');
    v_rep := RUN_REPORT_OBJECT(repid);
    END;
    rgds
    shyam

    Hi
    I can able to run the reports from the browser there was a syntax error, but not able to call from a form
    I am getting error but i can run another forms without any problem
    FRM-92101: There Was a failure in the FormsServer during startup
    oracle.forms.net.connectionexception:forms session aborted:unable to communicate with the runtime process
    rgds
    rosh

  • Error while sending emails from SOA 11G BPEL

    Hi All,
    I have configured an error email in my catch/catch-all blocks. Incase I dont have any retry action in my faultpolicies.xml file, the error email is sent fine. However if any remote/binding fault occurs and retry is done on partnerlink, in those cases the Error Notification service fails with below error:
    ORABPEL-31015
    Error while sending notification.
    Error while sending notification to email.
    Possible causes : SDPMessaging Driver not configured; Invalid To Address is used; Email server/Messaging gateway is down; using IP address as part of email ID instead of domain name;.
    Caused by: javax.naming.NameNotFoundException: While trying to look up comp/env/ejb/services/NotificationServiceBean in /app/ejb/ejb_ob_engine_wls.jar#BPELActivityManagerBean.; remaining name 'comp/env/ejb/services/NotificationServiceBean'
    sendEmailNotification WSIF Exception occured. Please check stack trace "Cannot get Object part 'Responses'. No parts are set on the message"
    If I throw a remote/binding fault (throw activity), the error email gets sent. However whenever the retry happens incase of a fault, the above error comes.
    Any idea what can be reason behing this...
    Regards
    Subhankar

    try to call a sub process from your catch all block and use the email activity in that subprocess. this should work

  • Terminated with error: REP-50152:Error while sending mail

    Hi
    Gets this error while sending report mails to external email id's
    Terminated with error: REP-50152: Error while sending mail - Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]
    Any setting to be done in report config file?
    thanks
    MG

    It should be like this
    <pluginParam name="mailServer">%MAILSERVER_NAME%</pluginParam>
    Specify the name of your mail server in the place of %MAILSERVER_NAME% above
    Also make sure that this is not commented out.
    Thanks,

  • What is the way to send a report through email?

    Dear all
    i am working with report3.0. i want to send the report through email.will aneyone plese tell me what are the steps needed to do this.
    report is already generated.but when i am clicking on mail option it gives error
    rep-4201 : error occured while initialize the mail subsystem.
    rep-4220 : there is a problem with the mail subsystem.
    thanks in adv.
    dp
    null

    hello,
    i would try DESTYPE=MAIL and the DESNAME would be the receipient.
    but be aware that on windows the desname must be a valid entry in the addressbook of your mail client (restriction of some MAPI clients)
    regards,
    the oracle reports team

  • Error while sending email to external mail - Urgent

    Hi All,
    I am getting error while sending email with attachement. The Error code is 02.
    I am not able to identify the error. bold Please help me in solving this problem.
    Is it anything wrong with the code or Any Configuration with SCOT/SOST.bold
    the code i am using is :
    REPORT YVR_F MESSAGE-ID XX .
    TABLES : EDIDC, EDIDS, EDPAR.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS : P_STATUS LIKE EDIDC-STATUS DEFAULT '51'.
    SELECT-OPTIONS : S_DIRECT FOR EDIDC-DIRECT,
                     S_MESTYP FOR EDIDC-MESTYP,
                     S_CREDAT FOR EDIDC-CREDAT.
    SELECTION-SCREEN END OF BLOCK B1 .
    PARAMETER: P_EMAIL LIKE SOMLRECI1-RECEIVER,
               P_SENDER LIKE SOMLRECI1-RECEIVER no-display,
               P_DELSPL  AS CHECKBOX,
               P_ONLINE NO-DISPLAY.
    DATA : TB_EDIDC LIKE STANDARD TABLE OF EDIDC INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA : TB_EDPAR LIKE STANDARD TABLE OF EDPAR INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA : TB_KNA1 LIKE STANDARD TABLE OF KNA1 INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA : TB_ADRC LIKE STANDARD TABLE OF ADRC INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA: INT_PDF TYPE TABLE OF TLINE WITH HEADER LINE.
    DATA : BEGIN OF TB_ED OCCURS 0,
             SNDPRN LIKE EDIDC-SNDPRN,
             LOC    LIKE ADRC-BUILDING,
             DOCNUM LIKE EDIDC-DOCNUM,
             IDOCTP LIKE EDIDC-IDOCTP,
             MESTYP LIKE EDIDC-MESTYP,
             DIRECT LIKE EDIDC-DIRECT,
             CREDAT LIKE EDIDC-CREDAT,
             STATUS LIKE EDIDC-STATUS,
           END OF TB_ED.
    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.
    Job Runtime Parameters
    DATA: GD_EVENTID LIKE TBTCM-EVENTID,
          GD_EVENTPARM LIKE TBTCM-EVENTPARM,
          GD_EXTERNAL_PROGRAM_ACTIVE LIKE TBTCM-XPGACTIVE,
          GD_JOBCOUNT LIKE TBTCM-JOBCOUNT,
          GD_JOBNAME LIKE TBTCM-JOBNAME,
          GD_STEPCOUNT LIKE TBTCM-STEPCOUNT,
          GD_ERROR    TYPE SY-SUBRC,
          GD_RECIEVER TYPE SY-SUBRC.
    DATA:  W_RECSIZE TYPE I,
           W_SPOOL_NR LIKE SY-SPONO.
          %_print LIKE pri_params.
    DATA: GD_SUBJECT   LIKE SODOCCHGI1-OBJ_DESCR,
          IT_MESS_BOD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
          IT_MESS_ATT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
          GD_SENDER_TYPE     LIKE SOEXTRECI1-ADR_TYP,
          GD_ATTACHMENT_DESC TYPE SO_OBJ_NAM,
          GD_ATTACHMENT_NAME TYPE SO_OBJ_DES.
    Spool to PDF conversions
    DATA: GD_SPOOL_NR LIKE TSP01-RQIDENT,
          GD_DESTINATION LIKE RLGRAP-FILENAME,
          GD_BYTECOUNT LIKE TST01-DSIZE,
          GD_BUFFER TYPE STRING.
    Binary store for PDF
    DATA: BEGIN OF IT_PDF_OUTPUT OCCURS 0.
            INCLUDE STRUCTURE TLINE.
    DATA: END OF IT_PDF_OUTPUT.
    DATA: GD_RECSIZE TYPE I.
    CONSTANTS: C_DEV LIKE  SY-SYSID VALUE 'DEV',
               C_NO(1)     TYPE C   VALUE ' ',
               C_DEVICE(4) TYPE C   VALUE 'LOCL'.
    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.
    DATA : MSTR_PRINT_PARMS LIKE PRI_PARAMS,
           MC_VALID,
           P_REPID LIKE SY-REPID,
           WF_ID  LIKE TSP01-RQIDENT,
           LOC_BYTECOUNT TYPE I.
    *start-of-selection.
    MSTR_PRINT_PARMS-PDEST = 'LOCL'.
    P_REPID = SY-REPID.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
        authority= ' '
       COPIES                       = '1'
       COVER_PAGE                   = SPACE
       DATA_SET                     = SPACE
       DEPARTMENT                   = SPACE
       DESTINATION                  = 'LP01'
       EXPIRATION                   = '1'
       IMMEDIATELY                  = 'X'
       LAYOUT                       = 'X_65_132'
       MODE                         = SPACE
       NEW_LIST_ID                  = 'X'
       NO_DIALOG                    = 'X'
       USER                         = SY-UNAME
    IMPORTING
       OUT_PARAMETERS               = MSTR_PRINT_PARMS
       VALID                        = MC_VALID
    EXCEPTIONS
       ARCHIVE_INFO_NOT_FOUND       = 1
       INVALID_PRINT_PARAMS         = 2
       INVALID_ARCHIVE_PARAMS       = 3
       OTHERS                       = 4.
         SUBMIT (P_REPID) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                          SPOOL PARAMETERS MSTR_PRINT_PARMS.
                          AND RETURN.
    NEW-PAGE PRINT ON NO DIALOG PARAMETERS
    MSTR_PRINT_PARMS.
    perform data.
    NEW-PAGE PRINT OFF. "This marks the end of the screen for which the
    *SPOOL NO WAS GENERATED.
    WF_ID = SY-SPONO.
    *converting spool to pdf
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
         EXPORTING
              SRC_SPOOLID              = WF_ID  "SPOOL NUMBER
              NO_DIALOG                = SPACE
              PDF_DESTINATION          = 'X'
         IMPORTING
              PDF_BYTECOUNT =
                 LOC_BYTECOUNT "NUMBER OF BYTES TRANSFERRED
         TABLES
              PDF                      = INT_PDF  "TABLE FOR PDF REPORT
         EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB     = 1
              ERR_NO_SPOOLJOB          = 2
              ERR_NO_PERMISSION        = 3
              ERR_CONV_NOT_POSSIBLE    = 4
              ERR_BAD_DESTDEVICE       = 5
              USER_CANCELLED           = 6
              ERR_SPOOLERROR           = 7
              ERR_TEMSEERROR           = 8
              ERR_BTCJOB_OPEN_FAILED   = 9
              ERR_BTCJOB_SUBMIT_FAILED = 10
              ERR_BTCJOB_CLOSE_FAILED  = 11
              OTHERS                   = 12.
    *CALL FUNCTION 'DOWNLOAD'
    *EXPORTING
    *bin_filesize = loc_bytecount "NO. OF BYTES
    *filename = 'C:/EMAILPDF.PDF'
    *filetype = 'BIN'
    **IMPORTING
    **act_filename = loc_filename
    *TABLES
    *data_tab = int_pdf.
    IF P_DELSPL EQ 'X'.
      PERFORM DELETE_SPOOL.
    ENDIF.
    Transfer the 132-long strings to 255-long strings
    LOOP AT INT_PDF.
      TRANSLATE INT_PDF USING ' ~'.
      CONCATENATE GD_BUFFER INT_PDF INTO GD_BUFFER.
    ENDLOOP.
    TRANSLATE GD_BUFFER USING '~ '.
    DO.
      IT_MESS_ATT = GD_BUFFER.
      APPEND IT_MESS_ATT.
      SHIFT GD_BUFFER LEFT BY 255 PLACES.
      IF GD_BUFFER IS INITIAL.
        EXIT.
      ENDIF.
    ENDDO.
    DESCRIBE TABLE IT_MESS_ATT LINES GD_RECSIZE.
    CHECK GD_RECSIZE > 0.
    PERFORM SENDMAIL USING P_EMAIL..
    *&      Form  sendmail
          text
    -->  p1        text
    <--  p2        text
    FORM SENDMAIL USING P_EMAIL.
      CHECK NOT ( P_EMAIL IS INITIAL ).
      REFRESH IT_MESS_BOD.
    Default subject matter
      GD_SUBJECT         = 'Subject'.
      GD_ATTACHMENT_DESC = 'IDOC LIST'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      IT_MESS_BOD        = 'List Of Failed Idocs'.
      APPEND IT_MESS_BOD.
      IT_MESS_BOD        = 'List Of Failed Idocs'.
      APPEND IT_MESS_BOD.
    If no sender specified - default blank
      IF P_SENDER EQ SPACE.
        GD_SENDER_TYPE  = SPACE.
      ELSE.
        GD_SENDER_TYPE  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
                                   TABLES IT_MESS_BOD
                                          IT_MESS_ATT
                                    USING P_EMAIL
                                          'Document attachment'
                                          'PDF'
                                          GD_ATTACHMENT_NAME
                                          GD_ATTACHMENT_DESC
                                          P_SENDER
                                          GD_SENDER_TYPE
                                 CHANGING GD_ERROR
                                          GD_RECIEVER.
    ENDFORM.                    " sendmail
    *&      Form  DELETE_SPOOL
          text
    -->  p1        text
    <--  p2        text
    FORM DELETE_SPOOL.
      DATA: LD_SPOOL_NR TYPE TSP01_SP0R-RQID_CHAR.
      LD_SPOOL_NR = WF_ID.   "GD_SPOOL_NR.
      CHECK P_DELSPL <> C_NO.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
           EXPORTING
                SPOOLID = LD_SPOOL_NR.
    ENDFORM.                    " DELETE_SPOOL
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          text
         -->P_IT_MESS_BOD  text
         -->P_IT_MESS_ATT  text
         -->P_P_EMAIL  text
         -->P_0846   text
         -->P_0847   text
         -->P_GD_ATTACHMENT_NAME  text
         -->P_GD_ATTACHMENT_DESC  text
         -->P_P_SENDER  text
         -->P_GD_SENDER_TYPE  text
         <--P_GD_ERROR  text
         <--P_GD_RECIEVER  text
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES   IT_MESSAGE
                                              IT_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.
      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.
      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.
      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[] = IT_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 = p_EMAIL.
      T_RECEIVERS-REC_TYPE = 'U'.
      T_RECEIVERS-COM_TYPE = 'INT'.
      T_RECEIVERS-NOTIF_DEL = 'X'.
      T_RECEIVERS-NOTIF_NDEL = 'X'.
      APPEND T_RECEIVERS.
      DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    W_SENT_ALL = 'X'.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_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
                object_header              = objhead
                CONTENTS_BIN               = T_ATTACHMENT
                CONTENTS_TXT               = IT_MESSAGE
                RECEIVERS                  = T_RECEIVERS
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
                OTHERS                     = 99.
      IF SY-SUBRC NE 0.
        MESSAGE E000 WITH 'Error occurred while sending'.
      ELSE.
        MESSAGE I000 WITH 'The document was sent'.
      ENDIF.
    ENDFORM.                    " SEND_FILE_AS_EMAIL_ATTACHMENT
    *&      Form  data
          text
    -->  p1        text
    <--  p2        text
    FORM data.
    SELECT SNDPRN
             DOCNUM
             IDOCTP
             MESTYP
             DIRECT
             CREDAT
             STATUS
             FROM EDIDC
             INTO CORRESPONDING FIELDS
             OF TABLE TB_EDIDC
             WHERE STATUS = P_STATUS
             AND MESTYP IN S_MESTYP
             AND DIRECT IN S_DIRECT
             AND CREDAT IN S_CREDAT.
    SELECT KUNNR
           INPNR
           FROM EDPAR
           INTO CORRESPONDING FIELDS
           OF TABLE TB_EDPAR
           FOR ALL ENTRIES IN TB_EDIDC
           WHERE KUNNR = TB_EDIDC-SNDPRN.
    SELECT KUNNR
           ADRNR
           FROM KNA1
           INTO CORRESPONDING FIELDS
           OF TABLE TB_KNA1
           FOR ALL ENTRIES IN TB_EDPAR
           WHERE KUNNR = TB_EDPAR-INPNR.
    SELECT ADDRNUMBER
           BUILDING
           FROM ADRC
           INTO CORRESPONDING FIELDS
           OF TABLE TB_ADRC
           FOR ALL ENTRIES IN TB_KNA1
           WHERE ADDRNUMBER = TB_KNA1-ADRNR.
    LOOP AT TB_EDIDC WHERE STATUS = P_STATUS
                     AND MESTYP IN S_MESTYP
                     AND DIRECT IN S_DIRECT
                     AND CREDAT IN S_CREDAT.
      TB_ED-SNDPRN = TB_EDIDC-SNDPRN.
      TB_ED-DOCNUM = TB_EDIDC-DOCNUM.
      TB_ED-IDOCTP = TB_EDIDC-IDOCTP.
      TB_ED-MESTYP = TB_EDIDC-MESTYP.
      TB_ED-DIRECT = TB_EDIDC-DIRECT.
      TB_ED-CREDAT = TB_EDIDC-CREDAT.
      TB_ED-STATUS = TB_EDIDC-STATUS.
      READ TABLE TB_EDPAR WITH KEY KUNNR = TB_EDIDC-SNDPRN.
      READ TABLE TB_KNA1 WITH KEY KUNNR = TB_EDPAR-INPNR.
      READ TABLE TB_ADRC WITH KEY ADDRNUMBER = TB_KNA1-ADRNR.
      TB_ED-LOC = TB_ADRC-BUILDING.
      APPEND TB_ED.
    ENDLOOP.
    WRITE :/02 'CustomerNo',
            15 'Location Code',
            30 'Idoc Number',
            55 'Basic Type',
            70 'Message Type',
            95 'Direction',
            110 'Received Date',
            130 'Status'.
    ULINE.
    LOOP AT TB_ED.
      WRITE :/02 TB_ED-SNDPRN,
              15 TB_ED-LOC,
              30 TB_ED-DOCNUM,
              55 TB_ED-IDOCTP,
              70 TB_ED-MESTYP,
              95 TB_ED-DIRECT,
              110 TB_ED-CREDAT,
              130 TB_ED-STATUS.
    ENDLOOP.
    ENDFORM.                    " data
    Kindly help me in solving the issue.
    Thanks in advance.
    Suki.

    Hi,
    Check in transaction SCOT. If your mail is in error status in SCOT, you can assure that there is no problem with your code. If your message has not reached till SCOT, then the problem will be with the code.
    If the mail is there in scot with error status tell the BASIS to configure it. I feel this could be the problem.
    Regards,
    Renjith Michael.

  • Error while sending the email notifcation

    Hi All
    I am getting this error while sending the email notifcation.If any one of you have any idea regarding this please suggest
    [2012-09-12T03:55:41.288-10:00] [soa_server1] [ERROR] [SDP-26102] [oracle.sdp.messaging.driver.email] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: OracleSystemUser] [ecid: f5c1f5acbf0bb7a6:22e05768:139ba096e4d:-8000-00000000000006ef,0] [APP: usermessagingdriver-email] Error while writing e-mail message content.[[
    java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
         at java.util.Vector.elementAt(Vector.java:427)
         at javax.mail.Multipart.getBodyPart(Multipart.java:157)
         at javax.mail.internet.MimeMultipart.getBodyPart(MimeMultipart.java:256)
         at oracle.sdpinternal.messaging.driver.email.EmailDriver.getHeaderEncoding(EmailDriver.java:1079)
         at oracle.sdpinternal.messaging.driver.email.EmailDriver.send(EmailDriver.java:670)
         at oracle.sdpinternal.messaging.driver.email.EmailManagedConnection.send(EmailManagedConnection.java:50)
         at oracle.sdpinternal.messaging.driver.DriverConnectionImpl.send(DriverConnectionImpl.java:41)
         at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean.onMessage(DriverDispatcherBean.java:296)
         at sun.reflect.GeneratedMethodAccessor2553.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy346.onMessage(Unknown Source)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:574)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:379)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
         at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
         at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    [2012-09-12T03:55:41.331-10:00] [soa_server1] [WARNING] [SDP-25107] [oracle.sdp.messaging.engine.store] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: OracleSystemUser] [ecid: f5c1f5acbf0bb7a6:22e05768:139ba096e4d:-8000-00000000000006ef,0] [APP: usermessagingserver] Message ID bac38bd50a1f32a129c5c739335a7855 in Status object does not match previously recorded Message ID b7e259a30a1f32a12c981a3ffd343f6d.
    [2012-09-12T03:55:41.362-10:00] [soa_server1] [ERROR] [] [oracle.soa.services.notification] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@3066bad4] [userId: <anonymous>] [ecid: 0000Jau4qHj9Lex_w9w0yW1GK6Rn000003,1:32530] [APP: soa-infra] <.> Error status received from UMS.[[
    Status detail :
         Status type : DELIVERY_TO_GATEWAY:FAILURE,
         Status Content : Failed to set message headers: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0,
         Addressed to : EMAIL:[email protected],
         UMS Driver : Farm_base_domain/base_domain/soa_server1/usermessagingdriver-email:oracle_sdpmessagingdriver_email#Email-Driver,
         UMS Message Id : b7e259a30a1f32a12c981a3ffd343f6d,
         Gateway message Id : ,
         Status Received at : Wed Sep 12 03:55:41 HST 2012.
    Check status details and fix the underlying reason, which caused error.
    [2012-09-12T03:55:51.492-10:00] [soa_server1] [WARNING] [] [oracle.soa.services.notification] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@3066bad4] [userId: <anonymous>] [ecid: 0000Jau4qHj9Lex_w9w0yW1GK6Rn000003,1:32530] [APP: soa-infra] <.> Could not find notification record corresponding to failed notification : (Channel message id) : b7e259a30a1f32a12c981a3ffd343f6d[[
    Hence it will not be retried.
    Possible cause could be purging of notification data after sending out notification, but before receiving status.
    ]]

    Are you using your email address to send the email notifications if it Is not configured with AD? Have you populated the mail attribute in weblogic console-->realms-->my realms-->users
    In addition are you sure you have configured the 'Email Driver Properties' correctly in EM ?? have you specified the Notification Mode to Email ?
    Please make sure that the outgoing mail server and port along with the username and password are correct.
    Also validate the workflow settings in your EM?
    In addition, please validate that when you logon to BPM worklist using the admin account and click on the name for e.g. weblogic, you see the email attribute populated properly.
    Thanks
    ACM

  • Error while sending email using TemplateEmailSender in CSC server

    Hi,
    We are trying to send email using TemplateEmailSender from CSC server. But it is giving Null Pointer Exception in ProfiledMessageSource like below. The same code is working fine in commerce instance but it is failing in CSC instance. We are using ATG2007.1p3
    Any pointers would be helpful.
    Below is the error.
    Error while sending email
    java.lang.NullPointerException
            at atg.userprofiling.dms.ProfiledMessageSource.isConfiguredForProfileSubject(ProfiledMessageSource.java:196)
            at atg.userprofiling.dms.DPSMessageSource.fireEndSessionMessage(DPSMessageSource.java:864)
            at atg.userprofiling.dms.DPSMessageSource.fireEndSessionMessage(DPSMessageSource.java:848)
            at atg.userprofiling.SessionEventTrigger.nameContextElementPreUnbound(SessionEventTrigger.java:553)
            at atg.nucleus.GenericContext.sendPreUnboundEvent(GenericContext.java:200)
            at atg.nucleus.GenericContext.preNotifyRemovedObject(GenericContext.java:528)
            at atg.nucleus.GenericContext.removeElement(GenericContext.java:566)
            at atg.servlet.SessionNameContext.unbindFromNameContext(SessionNameContext.java:557)
            at atg.servlet.SessionNameContext.stopSession(SessionNameContext.java:534)
            at atg.servlet.SessionNameContext.decrementWrapperCount(SessionNameContext.java:242)
            at atg.servlet.SessionBindingReporter.valueUnbound(SessionBindingReporter.java:206)
            at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1625)
            at org.apache.catalina.session.StandardSession.expire(StandardSession.java:749)
            at org.apache.catalina.session.StandardSession.expire(StandardSession.java:655)
            at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1100)
            at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
            at atg.userprofiling.email.TemplateInvoker$TemplateSession.endSession(TemplateInvoker.java:935)
            at atg.userprofiling.email.TemplateEmailSender.createMessage(TemplateEmailSender.java:2387)

    Thanks for the reply.
    My issue is fixed now. It is JBOSS configuration issue. Sessions are not maintained properly that's why we are getting NULL profile in the session. Our application has multiple WARs so we fixed it by setting emptySessionPath to TRUE. If emptySessionPath attribute in server.xml is false, then each WAR will have its own jsessionid cookie.
    I did not touch ProfiledMessageSource as its required for session triggering.

  • Authentication Error while Sending Email from SMTP server.

    Authentication Error while Sending Email from SMTP server.  Can receive emails but cannot send emails from this account. 

    no email account was setup on the phone unless it was issued by your company.
    gmail is required but no server address ports to enter.
    my gmail account was setup before i took delivery of the phone but could have been done when phone was activated.
    i added cox pop3 email and had to manually enter both pop3 and smtp servers with both boxes checked on both servers.
    i doubt if it's a verizon issue.

  • Error 400 - cant send photos through email

    I have windows 7 home premium, and can not send pictures through email.  I keep getting an error 400, and called in but was sent to Revel.  I use photoshop elements 9, and can not send any pictures.  Any Ideas?
    Thank You
    DebbyC

    http://helpx.adobe.com/photoshop-elements/kb/error-400-logging-photoshopcom-services.html
    With PSE 9, you can't use revel from within PSE.

Maybe you are looking for