How to attach a text/htm document to the message

Trying to attach a text/htm document to a workflow message and it is not working. Can someone please help?
Tried to attach it as a PL/SQL CLOB but the notification is never sent. It errors out with
ERROR:[SVC-GSM-WFMLRSVC-224510-10006 : oracle.apps.fnd.wf.mailer.SMTPOutboundProcessor.send(Message)]:Problem encountered when sending to {[["[email protected]"]]} -> javax.mail.MessagingException: IOException while sending message;
nested exception is:
     java.io.IOException: No content
Wrote a stand-alone procedure to check if it can load the file to a clob and displayed the contents and it read and displayed correctly so I am not sure why it does not generate any content.
DBMS_LOB.CREATETEMPORARY(
lob_loc => temp_clob
, cache => false
, dur => dbms_lob.call
DBMS_LOB.OPEN(
lob_loc => temp_clob
, open_mode => DBMS_LOB.LOB_READWRITE
DBMS_LOB.OPEN(src_clob, DBMS_LOB.LOB_READONLY);
DBMS_LOB.LoadCLOBFromFile(
DEST_LOB => temp_clob
, SRC_BFILE => src_clob
, AMOUNT => DBMS_LOB.GETLENGTH(src_clob)
, DEST_OFFSET => dst_offset
, SRC_OFFSET => src_offset
, BFILE_CSID => DBMS_LOB.DEFAULT_CSID
, LANG_CONTEXT => lang_ctx
, WARNING => warning
DBMS_LOB.CLOSE(src_clob);
amount := dbms_lob.getLength(temp_clob);
dbms_lob.copy(document,temp_clob,amount,1,1);
document_type := 'text/htm' || ';name=' || filename;
DBMS_LOB.CLOSE(lob_loc => temp_clob);
DBMS_LOB.FREETEMPORARY(lob_loc => temp_clob);
Then I tried to attach it as a PL/SQL BLOB and now it errors out with a different error.
[WF_ERROR] ERROR_MESSAGE=3835: Error '-20002 - ORA-20002: [WFMLR_DOCUMENT_ERROR]' encountered during execution of Generate function 'WF_XML.Generate' for event 'oracle.apps.wf.notification.send'. ERROR_STACK= WF_MAIL.GetDocLOBContent(ORDER_RPT) WF_XML.GetAttachment(1079953, text/html) WF_XML.GetAttachments(1079953 WF_XML.GenerateDoc(oracle.apps.wf.notification.send, 1079953) WF_XML.Generate(oracle.apps.wf.notification.send, 1079953) WF_XML.Generate(oracle.apps.wf.notification.send, 1079953) Wf_Event.setMessage(oracle.apps.wf.notification.send, 1079953, WF_XML.Generate) Wf_Event.dispatch_internal()
DBMS_LOB.CREATETEMPORARY(
lob_loc => temp_lob
, cache => false
, dur => dbms_lob.call
DBMS_LOB.OPEN(
lob_loc => temp_lob
, open_mode => DBMS_LOB.LOB_READWRITE
DBMS_LOB.FILEOPEN(src_file, DBMS_LOB.LOB_READONLY);
dbms_lob.loadblobfromfile(
DEST_LOB => temp_lob
, SRC_BFILE => src_file
, AMOUNT => dbms_lob.lobmaxsize
, SRC_OFFSET => src_offset
, DEST_OFFSET => dst_offset);
DBMS_LOB.FILECLOSE(src_file);
amount := dbms_lob.getLength(temp_lob);
dbms_lob.copy(document,temp_lob,amount,1,1);
document_type := 'text/htm' || ';name=' || filename;
DBMS_LOB.CLOSE(lob_loc => temp_lob);
DBMS_LOB.FREETEMPORARY(lob_loc => temp_lob);

Figured it out. Typed in 'text/htm' instead of 'text/html' for document_type.

Similar Messages

  • How to attach a text in the center of the Ellipse using JXML ?

    How to attach a text in the center of the Ellipse using JXML ? Can we use labelFor="$topEllipse" ?
    <StackPane fx:controller="myfxml.ArchiveLogsController" id="Login" xmlns:fx="http://javafx.com/fxml">
    <children>
    <AnchorPane>
    <!-- Prevent AnchorPane so that it's max = pref. This causes it to center in StackPane -->
    <maxWidth><Double fx:value="-Infinity"/></maxWidth>
    <maxHeight><Double fx:value="-Infinity"/></maxHeight>
    <children>
    <Ellipse fx:id="topEllipse" centerX="100" centerY="100" radiusX="50" radiusY="10" strokeWidth="2" stroke="#FF0000" style="-fx-fill: linear-gradient(to right, white 0%, red 100%);"/>
    *<Label fx:id="ArchLogs_lb" text="My Ellipse Label" />*
    </children>
    <properties>
    <backgroundColor>
    <Color blue="1.0" green="1.0" red="1.0" />
    </backgroundColor>
    <elementLockSel>
    <Boolean fx:value="true" />
    </elementLockSel>
    </properties>
    </AnchorPane>
    </children>
    </StackPane>

    I'd suggest putting the Ellipse and the Label in a StackPane.
    I wonder why so many people call it JXML?
    It is so strange - I guess the JXML name just seems more natural to some people, though I don't know why.
    I think Greg is right and that labelFor is not what you want:
    http://docs.oracle.com/javafx/2.0/api/javafx/scene/control/Label.html
    "Labels also are useful in that they can have mnemonics which, if used, will send focus to the Control listed as the target of the labelFor property . . . A Label can act as a label for a different Control or Node. This is used for Mnemonics and Accelerator parsing. This allows setting of the target Node."

  • How do you highlight text in document in Pages

    How do you highlight text in document in Pages

    but Pages is NOT a 3rd party app.  it's an application that's programmed by apple.  it's supposed to act something like Word in MS office, but that is not at all true. 
    choices for editing text, highlighting, et al., like what you find in MS Office Word, should be immediately available whenever you are inside of a Pages document, but that is not the case. 
    don't you wish that when you buy an apple app for apple/macs that is supposed to be like a windows something or another that it really is? 

  • How to attach a text file as an attachment to email message?

    Hello Everybody,
    I have a .csv file, in which details about emp-id, emp-name, e-expenses for Reimbursement and email address are stored.
    My application reads this .csv file, and sends a mail to each employee with his id, salary details in text format. (by changing content type to "text/plain") The code is working fine. But,
    My problem is:
    The message is sent as message body to the end user.
    The end user / the person who receives this mail will not be a technical person. So,
    1) If he trys to take a print out of this e-mail, He get only half of it.(as no. of colums will be more than paper size).
    2) I am finding alignment problem. IF employee name is too big, other columns will shift to right and data will not be exactly under column header. (it is going in zig zag way)
    So, I thought sending text file with all the details as an attachment might do well.
    But, I don't know how to attach a text file to email-message body.
    code
    try
                   {               String s1="";
                                  File f1 = new File(the path);
                                  FileInputStream fstream = new FileInputStream(f1); //new
                                  BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
                                  int count=0;
                                  while((s1=br.readLine())!=null )
                                                 count++;
                                                 //out.println("within while loop "+count);
                                                 StringTokenizer st = new StringTokenizer(s1,",");
                                                 if ((st.hasMoreTokens())&&(count>1))
                                            String a=st.nextToken().trim();
                                                 String b=st.nextToken();
                                                 String c=st.nextToken();
                                                 String d=st.nextToken();
                                                 String e=st.nextToken();
                                                 String f=st.nextToken();
                                                 String g=st.nextToken();
                                                 String h=st.nextToken();
                                                 String i=st.nextToken();
                                                 String j=st.nextToken();
                                                 String k=st.nextToken();
                                                 String l=st.nextToken();
                                                 String m=st.nextToken();
                                                 String n=st.nextToken();
                                                 String o=st.nextToken();
                                                 String p=st.nextToken();
                                                 String q=st.nextToken();
                                                 String mail=st.nextToken();
                                                 String s=st.nextToken();
                                                 //out.println("b="+b+"c="+c+"d="+d+"e="+e+"f="+f+"mail="+mail);
                                                 %>
    <%
                                            String to =mail;
                                                 String from =request.getParameter("fromadd");                                        
                                                 String subject ="Statement of Expenses";
                                                 String smtp ="mail.xxxxxxxxxx.com";
                                                 String message="";                                        
                                                 message=message.concat("EMP ID");
                                                 message=message.concat("     ");
                                                 message=message.concat("Name");
                                                 message=message.concat("          ");
                                                 message=message.concat("Dept No.");
                                                 message=message.concat("     ");
                                                 message=message.concat("Acc No.");
                                                 message=message.concat("     ");
                                                 message=message.concat("*****************************************************************************************");     
                                                 message=message.concat(a);
                                                 message=message.concat("     ");
                                                 message=message.concat(b);
                                                 message=message.concat("          ");
                                                 message=message.concat(c);
                                                 message=message.concat("     ");
                                                 message=message.concat(d);
                                                 Properties props = System.getProperties();
                                                 // Puts the SMTP server name to properties object
                                                 props.put("mail.smtp.host", smtp);
                                                 // Get the default Session using Properties Object
                                                 Session session1 = Session.getDefaultInstance(props, null);
                                                 // Create a New message
                                                 MimeMessage msg = new MimeMessage(session1);
                                                 // Set the From address
                                                 msg.setFrom(new InternetAddress(from));
                                                 // Setting the "To recipients" addresses
                                            msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to, false));
                                            /* // Setting the "cc recipients" addresses
                                            msg.setRecipients(Message.RecipientType.CC,InternetAddress.parse(cc, false));
                                            // Setting the "Bcc recipients" addresses
                                            msg.setRecipients(Message.RecipientType.BCC,InternetAddress.parse(bcc, false)); */
                                            // Sets the Subject
                                            msg.setSubject(subject);
                                            // set the meaasge in HTML format
                                            msg.setContent(message,"text/plain");
                                            // Set the Date: header
                                            msg.setSentDate(new java.util.Date());
                                            // Send the message
                                            Transport.send(msg);
                                            // Display Success message
                                            result =result.concat("<tr><td>"+b+"</td>"+"<td>"+to+"</td></tr>");
                                                      }//end of if of hasmore element
                                       }// end of while loop
                        out.println(result);                    
    }catch(Exception e)
                        // If here, then error in sending Mail. Display Error message.
                        result="Unable to send your message";
                        out.println("e="+e);
    Any help will be appreciated.
    Thanks and regards.
    Ashvini

    <html>
    <p>
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setText("Your Messages");
    MimeBodyPart mbp2 = new MimeBodyPart();
    FileDataSource fds = new FileDataSource("Your Attachments");
    mbp2.setDataHandler(new DataHandler(fds));
    mbp2.setFileName(fds.getName());
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    msg.setContent(mp);
    msg.saveChanges();
    msg.writeTo(System.out);
    msg.setSubject(subject);
    Transport.send(msg);
    </p>
    <B><U>See you can add above code in your program and see the magic</U></B>
    Bye
    regards--
    Ashish
    </html>

  • How to attach a text table to database table

    How to attach a text table to another database table,
    Ex: If we check Mara table and GoTO menu select text table it is displaying MAKT table, how to link that?

    create another table with foriegn key relation with the key field and in the check table give the primary key table and in the text table include sparas field.
    JUAT SAME AS CREATING ANOTHER TABLE WITH FORIEGN KEY RELATION but THE ANOTHER TABLE INCLUDES SPRAS (LANGUAGE KEY)
    A text table is a table that contains spoken-language descriptions of values in a check table. These descriptions are stored in multiple languages. The primary key of the text table is the same as the primary key of the check table, with the addition of a spras (language) column.
    For example, the ztxt005 table has country codes in it. Country names are stored in a separate table named ztxt005t (shown in Figure 4.7) because you actually need many names for one country code. Because it stores language-specific descriptions of a generalized code, ztxt005t is called a text table.
    The primary key of ztxt005t contains the same fields as the primary key of ztxt005, with the addition of a spras (language) column. The spras field contains the language code and enables this table to contain a description for multiple logon languages.
    The primary key of any text table is composed of the fields mandt and spras, followed by the validation field (or fields). One or more description fields follow this primary key.
    A foreign key relationship is defined on ztxt005t-land1 to check table ztxt005. The foreign key field type should be key fields of a text table.

  • Attaching  a MS-word document in the selection screen

    Hi,
    I need to attach an MS word document in the selection screen, if a user clicks on a button the MS word document need to get opened.
    Please let me know how to do it.
    regards,
    Prabhu

    Hi friend,
    Try this simple program...
    REPORT zawi_try.
    TABLES: sscrfields.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 10(10) word  USER-COMMAND as.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
      MOVE 'WORD' TO word.
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
        WHEN 'AS'.
          CALL FUNCTION 'GUI_RUN'
            EXPORTING
              command   = 'winword'
              parameter = 'C:\a.doc'.
      ENDCASE.
    This might be helpful....
    Thanks..

  • Attach disclaimer text sent out from the Outbound emails in PeopleSoft

    Hi,
    Any idea on How to attach disclaimer text for all the Outbound emails in PeopleSoft .
    Thanks
    Soundappan
    Edited by: Soundappan on May 24, 2011 10:23 PM
    Edited by: Soundappan on May 24, 2011 10:24 PM

    The simplest way is to contact your email server team. I know exchange can add a disclaimer to all outgoing messages.

  • I Try to open an Indesign document. The message: it is made in a newer version. Go tot CC: Help/Give your Adobe id/Start Indesign again and try to open the document. This doesn't work. How to solve this problem?

    I Try to open an Indesign document. The message: it is made in a newer version. Go tot CC: Help/Give your Adobe id/Start Indesign again and try to open the document. This doesn’t work. How to solve this problem?

    What version are you running?
    What version was it made with?

  • How do I combine text and photos on the same page in iPhoto using photobook

    How do I combine text and photos on the same page in iPhoto using photobook?

    You mean while creating a book in iPhoto?  Click on the layout button while viewing a page and select the layout that includes both text and photos.  Most themes will have those options.
    OT

  • How do I duplicate a pdf document in the cloud?

    How do I duplicate a pdf document in the cloud?

    Hi marting82944462,
    As mentioned above by Bernd Alheit you will have to download the file on the local disc from the cloud & then upload it again, however you will have to rename the file as the architecture does not support two or more files with a similar name.
    In case if you still have any query, please let us know. We will be more than happy to help you.
    Regards,
    Aadesh

  • How do I open a XLSM document on the iMac ?

    How do I open a XLSM document on the iMac ? I just get "Import Error".

    theislandguy wrote:
    How do I open a XLSM document on the iMac ?
    Use Microsoft Excel or a compatible app.
    I just get "Import Error".
    In what app? Or are we playing Twenty Questions?
    Excel 2008 should be able to open it, but not play any of the macros. Excel 2011 should be able to open it and play the macros -- unless they contain Win-specific code. OpenOffice/NeoOffice/LibreOffice's Calc should also be able to open it, but the extent to which it will be able to play the macros also depends on the code.

  • Using an iPad wi-fi 3G. How do I save received email documents in the my device? Really hate having to go through my emails to find a document. And where do I save it?

    Using an iPad wi-fi 3G. How do I save received email documents in the my device? Really hate having to go through my emails to find a document. And where do I save it?

    triplembm wrote:
    I downloaded a PDF from an email and have been trying to save the file in my document file.  When using Snow Leopard I used to hit Command S and it would ask me where I wanted to save the document.  i just got an iMac with Lion and when I hit Command S I get nothing.
    Welcome to Lion's new feature: Versions
    How do I save a document using Lion? 
    To save a NEW copy in Preview:
         File->Export
    You said that you d/l'd a PDF in Mail, so why not just click the "Save" button in Mail?
    (Make sure that you click the "Details" button in Mail)
    In Mail:
    BTW, I'm very happy with Lion.  (In regard to all the negative Lion posts, ask yourself if you're more likely post a comment here telling us how happy you are with features of Lion, or to complain about something that's changed).

  • How can I convert text to PDF in the new "Pages" without losing info.

    How can I convert text to PDF in the new "Pages" without losing a lot if information?

    Select Export To from Pages' File menu, then select PDF from the sub-menu.

  • How do I remove text highlight box in the Notes panel in Presenter 8?

    How do I remove text highlight box in the Notes panel in Presenter 8?  It moves at a different speed than the voice and is distracting.  Better not to have it at all.

    Hi,
    To disable higlighting text in notes pane is not possible in presenter 8.
    However it is possible to disable in presenter 9. 
    Thanks
    Sunil
    Adobe Presenter Engg Team

  • Pages for ipad2 - how do you get text to wrap around the contours of a picture? Not the simple square wrap, but I saw text following the contours of a bike wheel at the Apple store demo

    Pages for ipad2 - how do you get text to wrap around the contours of a picture?  Not the simple square wrap, but I saw text following the contours of a picture of a bike wheel at the Apple store demo

    Sjazbec,
    Thanks for the reply.
    I did read the help and went through the tutorial - the butterfly text wrap (and the wrap around the curved contour of the bicycle wheel at the Apple store) is the reason I am asking this question.  I don't know how to use one of my own pictures and tell Pages what contour to wrap around.  Is there some additional image editing software that I need to "creatively crop" one of my own pictures, so that Pages will be able to wrap around that contour?
    Thanks / Danke!!

Maybe you are looking for

  • IPhoto on Time Capsule won't open

    When I am connected to my network at home (Time Capsule) and try to open iPhoto it freezes, I get the spinning wheel of death and have to force quit. It does not happen when connected to other networks. Anyone else having this issue. I have been to A

  • I can hear caller but he can't hear me except on hands free and speaker phone

    I can hear caller but he can't hear me except on hands free and speaker phone, hoew to fix this problem

  • New iMac - How to make my friends go WOW

    Ok here's my question.. I would like to show off my new Leopard iMac 24 inch To my skeptical friends .... '' and make them go Wow '' What do you suggest for this Apple newbie..? Thanks

  • Pixel edges in Boris Title 3D

    I get pixelation of the edges of everything I make in Boris 3D. They are in exports via quicktime movie or conversion. Also getting lockups occasionally when using Boris 3D and have to Force Quit FCE. 1) Am I right that using default titles in Boris

  • Print to Linux Server Running Samba & CUPS

    Trying to get iMac to print to the shared printer on home Linux Server running Samba and CUPS 1.2.10. The printer shows up as a shared printer, however, in looking in my logs, I see that the destination packets are being sent to ip 255.255.255.255, i