Enter in Message Body

Hi Guys,
I have designed a loop which initializes a varchar string in a variable. Now the loop runs for say 5 times and it will append 5 words in the variable. I want that after every single execution of the loop it should append a 'Enter' to that variable so that the words are arranged row wise instead of column wise.
Please can you guys advise if this is possible in Bodi
Cheers,
Shazin

Hi Suneer,
The issue for the enter in message body has now been successfully resolved.
I am getting a small issue wherein when I am trying to smtp_to multiple addresses I am not able to send and the mail is only being delivered to first recipient. Please see the syntax as below:
Code:
$GV_RCA_Portal_Email_Transmission = $GV_RCA_Portal_Email_Extraction ||','||$GV_RCA_Portal_Supervisor_ID||','||$GV_RCA_Portal_Admin_Team;
smtp_to( $GV_RCA_Portal_Email_Transmission,'RCA Pending in Assigned State',$GV_RCA_portal_Final_Message,0,0); 
Please can you advise.
Best Regards,
Shazin

Similar Messages

  • When i go to send a new text, the text field isn't blank.  There is already text entered in the message body.

    When i go to send a new text, the text field isn't blank.  There is already text entered in the message body that I have to go in and delete before typing my new text.  this prevents me from forwarding anything through text because if I get something I wish to forward, selecting forward as an option always brings up the same junk just like when trying to send a new message.  How can i remedy this?

    Here it goes -
    1) Download iBackupBot: http://download.cnet.com/iBackupBot/3000-2141_4-10969873.html
    2) Plug phone into computer and run backup
    3) Use "Explorer" box to find Messages: HomeDomain/Library/SMS/Drafts/(null).draft/
    4) In "Null Drafts" there is a file "message.plist"
    5) Double click to open, (cancel the popup if you did not purchase the iBackupBot) and you will see the prepopulating message on the <string> line 6
    6) Delete the offending text, leave all code
    7) Close text editor
    8) Right click on message.plist file and select "Restore selected item(s) to device"
    9) File will be restored to your phone and it will restart itself.
    10) Voila! Now it is time to consider that Windows phone....:)

  • Cant Edit Message Body (outlook 2003 and 2007), Cant select text VIA click (word), Cant Edit Advanced Options (word)

    A number of my users are having similar problems across the entire network. These issues have started on 8/26/2014
    This problem is not localized to a specific outlook version, the problem is happening on 2003 and 2007 alike. Also this problem is starting to move into MS-Word.
    In outlook i am unable to click the message body. If i click the message body nothing happens. I cannot select any text, type, or anything in the message body. I am however able to type in the message body if i press the 'tab key' and navigate to the message
    body. 
    I have wiped out profiles. reset all user settings, changed datafiles etc. Nothing i do seems to affect this problem.
    On microsoft word i am unable to edit a number of documents. These documents are readable, editable etc on different computers. There are not any protections on the files. The user who reported this problem is however unable to edit the text even though
    others are able to. To correct this problem we have protected and unprotected the file checked permissions all with no luck. 
    On the same computer i am unable to change any advanced options. When i attempt to click the listing nothing happens. Its acting in the same manner as outlook is described above. However i am unable to select anything using the 'tab' key.
    These problems started on a few different computers, but is beggining to spread and affect more users across the network.
    This also does not seem to be a group policy issue. We have a number of different user groups on the network, and this problem is not isolated to any specific user, or group, group member etc..
    Thanks in advance to anyone who might be able to lend some assistance to solve this matter.
    X

    Hi,
    Please first verify the activation status of your Microsoft Office.
    If your Microsoft Office is activated, please try to start Outlook or Word in safe mode to check if this issue persists. To do this, press Windows key + R to open the Run command, type
    outlook /safe and press Enter.
    Also please try to run a repair of your Office installation to check the result. See:
    http://support.microsoft.com/kb/924614
    Please let me know the result.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Incoming Emails with Blank message body in Outlook 2013 and 2010

    Dear TechNet
    Why Some of the incoming message we received in Outlook  are displayed with blank message body but same message when viewed from Internet browser web  client  or in Blackberry device message body is viewable and also same message is viewable
    in outlook ver 2003 , 2007, 2010 ( without service pack1)
    Above problem of incoming email message with blank message body we are facing to users with outlook2013 and outlook 2010 (with sp1) and when the sender of the email is using  Lotus Notes Client ver 8.5.3
    Request you kindly suggest any setting need to be done in outlook or windows registry to resolve the email messages with blank body.
    Thanks in Advance ............................
    Regards,
    Jayesh
    Mob : 09819375673

    This is commonly seen with an Outlook add-in, such as the AVG add-in. I just ran into it again today. I removed AVG and enabled Windows Defender on a Win8 laptop with Outlook 2013, and that took care of the issue. If you must use AVG, you can disable the
    add-in and then test new emails.
    To disable the AVG add-in, this is one method:
    Important Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry.
          (https://support.microsoft.com/kb/322756/            )    
    in case problems occur.
    To resolve this problem, follow these steps to disable the Avgoutlook.Addin add-in. If the problem is , we recommend that you contact the vendor of the add-in to ask about an updated version of the add-in. 
    Exit Microsoft Outlook if it is running.
    Start Registry Editor.
    In Windows 8
    Press the Windows logo key+R, type regedit in the Open box, and then press Enter.
    In Windows 7, 8 or Windows Vista
    Click Start, type regedit in the Start Search box, and then press Enter.
    Locate and then select the following registry subkey, depending on the type of Office and Windows installations that you have.
    32-bit Office plus 32-bit Windows
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins\avgoutlook.Addin
    64-bit Office plus 64-bit Windows
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins\avgoutlook.Addin
    32-bit Office plus 64-bit Windows
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Outlook\Addins\avgoutlook.Addin
    Right-click the LoadBehavior value, and then click Modify.
    Change the Value Data value to 0, and then click
    OK.
    Start Microsoft Outlook.
    Note To re-enable this add-in in Outlook, change the LoadBehavior value to
    3.

  • XML Message Body Selector in Automation

    Hi,
    I'm having some trouble implementing a XML Message Body Selector in an automated task. I'm running OSM 7.2.0.7 in a Unix environment and using Design Studio 7.2.1.
    I'm sendind in my request to an external system a request tthe following string: OSM-TaskName-%{CARTRIDGE_VERSION}
    <Request>
        <Header>
            <dueDate>20131128</dueDate>
            <application>OSM-MSS_Lookup-1.0.0.0.5</application>
        </Header>
    </Request>
    The response of MSS is:
    <Response>
        <Header>
            <dueDate>20131128</dueDate>
            <application>OSM-MSS_Lookup-1.0.0.0.5</application>
        </Header>
    In the selector I've tried different XPath expressions:
    Select:
    /*[local-name() ='Response']/*[local-name()='Header']/*[local-name()='application']/text()
    *[local-name() ='Responset']/*[local-name()='Header']/*[local-name()='application']/text()
    //*[local-name() ='Response']/*[local-name()='Header']/*[local-name()='application']/text()
    /*[local-name() ='Response']/*[local-name()='Header']/*[local-name()='application']
    *[local-name() ='Response']/*[local-name()='Header']/*[local-name()='application']
    //*[local-name() ='Response']/*[local-name()='Header']/*[local-name()='application']
    /Response/Header/application
    /Response/Header/application/text()
    Compare: OSM-MSS_Lookup-%{CARTRIDGE_VERSION}
    I keep getting the following error in the log file for the differente selectors:
    ####<Nov 28, 2013 10:34:31 AM CST> <Info> <oms> <hostname> <SOM_ManagedServer_1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'
    > <sceadmin> <BEA1-49AB960B7AE5258D5CC8> <0710a255d6bbb54d:-1d6ed94c:142960580fb:-8000-0000000000026363> <1385656471431> <BEA-000000> <api.e:
            namespace/version: SOM_Cartridge/1.0.0.0.5
            automator type: taskAutomator
            plugin JNDI name: MSS_Lookup.automatedtask.somprovisioning.MSS_LookupReceiverBean
            plugin class name: oracle.communications.ordermanagement.automation.plugin.XQueryReceiver
            run plugin as: oms-automation   receiver:
                    type: external
                    JMS source: sky/MSS/Product/WebServiceResponseQueue
                    message [property|body] selector: JMS_BEA_SELECT('xpath', '/*[local-name() ='Response']/*[local-name()='Header']/*[local-name()='application']')='OSM-MSS_Lookup-1.0.0.0.5'
    ####<Nov 28, 2013 10:34:31 AM CST> <Warning> <EJB> <hostname> <SOM_ManagedServer_1> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <oms-automation> <> <0710a255d6bbb54d:-1d6ed94c:142960580fb:-8000-000000000002650a> <1385656471454> <BEA-010061> <The Message-Driven EJB: MSS_Lookup.automatedtask.somprovisioning.MSS_LookupReceiverBeanMDB is unable to connect to the JMS destination: sky/MSS/Product/WebServiceResponseQueue. The Error was:
    javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "JMS_BEA_SELECT('xpath', '/*[local-name() ='Response']/*[local-name()='Header']/*[local-name()='application']')='OSM-MSS_Lookup-1.0.0.0.5'"
    Nested exception: javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "JMS_BEA_SELECT('xpath', '/*[local-name() ='Response']/*[local-name()='Header']/*[local-name()='application']')='OSM-MSS_Lookup-1.0.0.0.5'"
    I would appreciate any help or ideas.
    Cheers

    Hi,
    Could you confirm on below:
    1 ) Are you using multiple automation plug-in external event receivers in the same automation task ?
    2 ) And are you having the default Correlation Message property set to 'JSMCorrelationID' in external event receiver?
    If your answer for the first question is No, they i would suggest to use Correlation XML Body as
    *[local-name() ='Response']/*[local-name()='Header']/*[local-name()='application']
    The value of the field(application) in request must match the value of the field in response, in your case it is matching. And you will be reading this correlation id in response processing xquery.
    Regards
    Srinivas

  • Is it possible to exclude .PDF file from Email Message body ?

    Hello Friends,
    I am sending e-mail from one program with attachment of EXCEL file.
    I am using following function SO_NEW_DOCUMENT_ATT_SEND_API1
    I am getting body of the message as a separate .PDF file.
    Even I want in real message body.
    <REMOVED BY MODERATOR>
    Regards,
    NVM
    Edited by: Alvaro Tejada Galindo on Dec 28, 2007 7:47 AM

    NB - the "data" that is returned by these classes is the data as defined in an adobe form - it doesn't return the content of non-form PDF documents.
    The PDF must be an interactive form ( although that doesn't restrict you to using the SAP process for creating the form is my understanding - but I could be wrong. )
    Edit - I was wrong! ONLY PDF documents that have been created by the ADS can have data extracted using these classes. So unless you are using Adobe interactive forms - then you will get no value from this functionality - and if you're using AIF then you're probably just use the standard UI element
    Edited by: Chris Paine on Oct 26, 2010 6:04 PM

  • Single page PDF file in mail always appears in message body, instead of as an attachment, contrary to a multiple page PDF. Why?

    When sending a single page PDF file in mail, it always appears as an open file in the message body. Multiple page PDF files appear as attachments. Why the difference and how to change the behavior of single page PDF files so that they appear as attachments instead of open files?

    Hello billsbs,
    Welcome to the Apple Support Communities!
    I understand that when you add a PDF to mail you see its entire contents, but when you add two or more pages Mail shows them as a document icon. To change this behavior for that specific email, please follow the instructions in the attached article. 
    Mac OS X Mail: About PDF attachments
    Have a great day,
    Joe

  • How to send HTML as message body using SMTP

    I need to send HTML formatted emails. I used the Report Generation Toolkit to build my HTML document and make sure I had all of the formatting right. Then I modified the Save Report To File.vi to also give me the HTML text string on an output connector and I wire this string to the message input on the SMTP Email Send Message.vi.
    I receive the email OK, but all I see is the HTML code in the message body. What can I do to make sure that the email displays the message correctly.
    I use Outlook and I know it will receive and display HTML emails, I get them all the time.
    I would appreciate any help.

    Hi Dgw,
    it is similar. You must change message MINE content-type to "text/html" type. Because everyone document in email protocol have set MINE content-type. It is inforamtion for email servers and for email cients (Thunderbird, Outlook and etc.)
    For sendning mail with attachments you must use and modified "SMTP Send Multiple Attachments.vi" - if you can do backup of this VI and subVIs. Open Diagram of "SMTP Send Multiple Attachments.vi" after "SMTP Send Multiple
    Attachments Message.vi" and ther is VI "MIME Send Data Attachment.vi" - have control "MIME content-type" but code from NI don't use it.
    And like as my previous message, create new string control "MINE content-type" and take out this control to "main" Email VI.
    And embedd
    ed file you set up in control-cluster "attachments". I don't test it, but I mind thet must working :-)
    Have nice day
    JCC
    Attachments:
    email.jpg ‏70 KB

  • How to include original message body in the reply to a workflow notificatio

    Hi,
    I have a requirement from my clients.
    Standard Functionality: When a Manager clicks on the APPROVE (button / link) to approve a workflow notification from a mailing application, a (response) mail gets composed to the Workflow Mailbox with the NID and Access Key. The content as shown below.
    ===========================
    Action: 'Approve'
    Comments: ''
    NID[3699/874478985@WFMAIL3]
    ===========================
    Requirement:
    The requirement is that, when the Maanger clicks on Approve / Reject, the original message body also has to get populated into the response mail along with the NID and Access Key.There would be audits conducted(looking into the workflow mail box) on the approval / rejection decisions taken by the users. The intention of getting the originial message body is to identify, to which notification(or letter) this action was taken. Me, being a Technical person can get it from the Notification Id in the workflow mail box, but the people conducting the Audit cant identify that. So, I need to get the original message body into the response. This is the reason for the requirement.
    Actually, I dont need the whole message body, but the value in an URL attribute, which is one of the SEND attributes of the notification in question.
    fyi, It is a VOTING ACTIVITY and hence, I donot know how many users would get the notification.
    I tried creating a RESPONSE Attribute(I understand that, a response attribute is an attribute where I accept inputs from the user), but couldnt assign the value to that attribute.
    Regards
    Anil K A

    Sadly, I believe this will require a bit of development to make it happen. The project I'm on now...we are finding that to get it to do what we want it to do, a development to customize the email message to include all the case fields is required.
    D

  • Download error, message body could not be downloaded

    Someone please help me with this.  I've had the Q10 since it came out and ever since I've had it there are emails that will just not open.  These emails are simple text emails.  I thought this was normal and didn't think anything of it until I spoke to a coworker who also has a Q10 and he is not having the same issue.  So I searched high and low to try and find a solution and nothing. 
    To be clear this only happens to a few emails. 
    I tried pulling the battery.
    I tried software updates. I am running BB 10 OS Software Release 10.1.0.238.  Nothing better then this available.
    I tried deleting anything older emails since I did see somewhere in my search for an answer that there maybe an old email with odd characters causing the issue. 
    Still nothing.
    When I open the email I get the header info i.e.. Who it was sent to, from and subject.  I get the flower with the word image001.jpg and the size of the file (again this is a txt file no images).  And in the middle of the screen I get the circle going around for about a minute as if it's loading and then the error pops up;
    Download Error
    Message body could not be downloaded
    Cancel OK
    hitting Cancel or OK just brings me back to my list of emails
    Any suggestions of fixes would be appreciated. 

    i have the same " download error " but with BBM invites

  • Message body is empty, when calling wf_notification.send ,

    hi,
    i am sending a messages to 5 peoples, using wf_notification.send api.
    but the when i check the emails, mesage body is empty.
    prior to calling wf_notification.send Api,
    my message body has been generated by the message attribute of type document(plsqlclob), iam using wf_engine.setItemAttribute and the argument avalue is like this
    avalue=> 'plsql:koc_overtime_web_pkg02.show_mgr_message_TST/'||itemtype || ':' || ItemKey) for setting this message attribute(this will generate html)
    Shall i need to use any callback function in my send api.
    regards.
    zameer.

    If you are using WF_ENGINE.SetItemAttrText API, I see that you have a workflow item that is launched. In such a case you could just have a notification activity within the same process that will send the notification and the e-mail appropriately.
    Why do you use WF_NOTIFICATION.Send using an attribute value that is set from a Workflow item.
    Typically WF_NOTIFICATION.Send function is used to send a notification outside of a workflow process. Typically you would use a workflow message definition and corresponding message attribute definition and use the following code to send the notification.
    declare
        l_nid   number;
        l_user  varchar2(320) := '&1';
        l_begin_date date;
    begin
        l_nid := wf_notification.send(l_user, 'CS_MSGS', 'FYI_MESSAGE');
        wf_notification.setattrtext(l_nid, 'SENDER', 'Oracle Workflow Testing Mailer');
        wf_notification.setattrtext(l_nid, 'MESSAGE_TEXT', ' Message sent at '||to_char(sysdate,'DD-MON-RRRR HH24:MI:SS')||' DB server time');
        wf_notification.denormalize_notification(l_nid);
        commit;
    end;
    /As you can observe, I do not depend on any workflow item for any attribute information. Please note that in case if there is a requirement to depend on a workflow item, it is required that you need to pass a Callback function and Context to WF_NOTIFICATION.Send function in order for the workflow item attribute information to be copied over to notification attributes.

  • IBooks on iPad Sending 1 Page PDF as Part of Message Body in Email

    iBooks is sending 1 page PDF documents inline as photos in email messages and multi page PDF documents as attachments.  How do you get iBooks to send 1 page PDF documents as attachments in an email instead of as a photo inline in the message body?

    I am having the same problem and it is even bigger.
    When opening a 1-page PDF in iBooks and sending it via mail it is sent inline as preview, but the recipient cannot open the file anymore. Also on iPad and iPhone the is no "open in" possible.
    Somehow the mail app does destroy the file. What is going wrong?

  • MessageBody.txt file instead of actual message body when attachment="true"

    Hi guys,
    Using XMLP 5.6.3 with EBS (with patch 5968876 applied)
    Trying to send out a PDF report via email using the bursting engine. We need the report to be attached but the message body to show in the actual message body window of the client.
    Right now, instead of that we get the message body as an attachment called messageBody.txt
    Here are some relevant lines of my control file:
    <xapi:email server="email.server" port="25">
    <xapi:message id="123" to="[email protected]" attachment="true" content-type="html/text" subject="My subject">Dear customer,
    This is the actual message body</xapi:message>
    </xapi:email>
    </xapi:delivery>
    <xapi:document key="${TRX_NUMBER}" output="${TRX_NUMBER}" output-type="pdf" delivery="123">
    If I set attachment="false" then I get the message body but no PDF file.
    Any ideas?
    Thanks,
    Michel

    I posted this as an issue (the attachment does attach but a blank txt box also attaches) a long time ago, but didn't get a response from either Tim or Development. Here is the thread with further info.
    Re: XMLP OA ROLLUP PATCH 5.6.3 bursting email creates blank messageBody.txt
    Rob
    http://www.scnet.com.au

  • Sending email  with message body contain data  in table   displayed in one

    Hi,
    I have one jsp page where I am dispalying the table data retrieved fron database.
    Now i am trying to send this table as message body of the mail to the user.I am doing same stuff last from six days but unable to send such data.
    Please help me Sir,as i am newbie here.
    Here is an jsp page.
        Document   : evaluationeventtable
        Created on : Jul 24, 2008, 6:52:37 PM
        Author     : user1
    --%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@ page language ="java" %>
    <%@ page import="java.sql.*, javax.sql.*, javax.naming.*,java.io.*,java.util.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>IGIDR</title>
            <link rel="stylesheet" href="../styles/styles.css" type="text/css">
        </head>
        <body>
             <table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td><%@ include file="/includes/logohead.jsp" %></td>
    </tr>
    <tr><td><%@ include file="/toplinks.jsp"%></td></tr>
    <tr>
    <td width="100%" valign="top">
    <table width="100%" cellspacing="0" cellpadding="0" border="1" borderColor=#000066>
        <tr>
    <td width="80%"> 
        <%  int QNO;
             String message=null;
             //String message1=null;
             //String message2=null;
             String noA,noB,noC,noD;                
            String ID=request.getParameter("id");       
            String EVENTID=request.getParameter("event");       
            Connection connection = null;
            Statement st = null;
            Statement st1 = null;
            Statement st2 = null;
            Statement st3 = null;
            Statement st4 = null;
            Statement st5 = null;
            ResultSet rs= null;
            ResultSet rs1= null;
            ResultSet rs2= null;
            ResultSet rs3= null;
            ResultSet rs4= null;
            ResultSet rs5= null;
            Class.forName("com.mysql.jdbc.Driver");
            Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/mynewdatabase","root", "root123");
                           st=con.createStatement();
                    try  {              
                      rs = st.executeQuery("SELECT * FROM Questionbank where Questionid='"+ID+"'");
                   %>
                <table border="1" cellpadding="2" cellspacing="3" bgcolor="#E6E6FA" align="center"><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>
                 <%  message="<table border=1 cellpadding=2 cellspacing=3 bgcolor=#E6E6FA align=center><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>";%>
                   <%
                  while ( rs.next() )
                            //String NO=rs.getString("Qserialno");
                            //session.setAttribute("no",NO);
                            //String NAME=rs.getString("questionname");
                            //session.setAttribute("name",NAME);                                    
                       %>
                       <tr><td><%=rs.getString("Qserialno") + "." + rs.getString("questionname")%></td>
                       <%
                        message=message+"<tr><td>"+rs.getString("Qserialno") + "." + rs.getString("questionname")+"</td>";
                       st1=con.createStatement(); 
                       try
                          rs1=st1.executeQuery("select count(*) as total  from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='A'");
                         rs1.next();
                         noA=rs1.getString("total");
                         session.setAttribute("NOA",noA);
                          rs1=st1.executeQuery("select count(*)  as total from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='B'");
                       rs1.next();
                         noB=rs1.getString("total");
                         session.setAttribute("NOB",noB);
                          rs1=st1.executeQuery("select count(*) as total  from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='C'");
                        rs1.next();
                         noC=rs1.getString("total");
                         session.setAttribute("NOC",noC);
                          rs1=st1.executeQuery("select count(*) as total  from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='D'");
                          rs1.next();
                         noD=rs1.getString("total");                   
                         session.setAttribute("NOD",noD);
                         message=message+"<td>"+noA+"</td><td>"+noB+"</td><td>"+noC+"</td><td>"+noD+"</td></tr></table>";
                         %>                     
                     <td><%=noA%></td><td><%=noB%></td><td><%=noC%></td><td><%=noD%></td></tr>
                   <%        
                         } finally
                               if (rs1 != null)
                                   rs1.close();
                                   rs1 = null;
                               } if (st1 != null)
                                   st1.close();
                                   st1 = null;
                                       finally
                               if (rs != null)
                                   rs.close();
                                   rs = null;
                               if (st != null)
                                   st.close();
                                   st = null;
                                   con.close();
                      %></table>   
                      <table align="center" width="50%" cellspacing="0" cellpadding="0" border="1" borderColor=#D2691E>
                      <form name="sendmail" action="/student/servletmail" method="POST">
                       <tr class="CellColor">
              <td>To</td>
              <td class="CellColor" width="1%">
              </td>
              <td class="CellColor">
                   <input type="text" name="to" size="25" value="">
              </td>
                    <td>From</td>
              <td class="CellColor" width="1%">
              </td>
              <td class="CellColor">
                   <input type="text" name="from" size="25" value="">
              </td>
         </tr>
            <input type="hidden" name="message" value="<%=message%>">
            <tr class="CellColor">
              <td class="CellColor" colspan="9" align="center">
                   <input type="submit" name="tn1" value="Send" >
              </td>
         </tr>   
      </form></table></td></tr></table>
                  </table>
                         </body></html>    And here is an servlet where i am trying to send the mail
    package com.student.igidr.test;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.event.*;
    import javax.mail.internet.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author user1
    public class servletmail extends HttpServlet
            public  void doPost(HttpServletRequest request,HttpServletResponse response)
                                      throws ServletException, IOException
            PrintWriter out=response.getWriter();
            response.setContentType("text/html");
            try
               Properties props=new Properties();
               props.put("mail.smtp.host","webmail.igidr.ac.in");   //  'localhost' for testing
       Session   session1  =  Session.getDefaultInstance(props,null);
               String s1 = request.getParameter("to");
               String s2 = request.getParameter("from");
               //String s3 = request.getParameter("sub");
               String s4 = request.getParameter("message");
              // out.println(s4);
         Message message =new MimeMessage(session1);
         message.setFrom(new InternetAddress(s2));
          message.setRecipients
                 (Message.RecipientType.TO,InternetAddress.parse(s1,false));
              // message.setSubject(s3);
               message.setText(s4);       
              message.setContent(s4,"text/html");
               Transport.send(message);
               out.println("mail has been sent");
            catch(Exception ex)
               System.out.println("ERROR....."+ex);
    }I am using the message variable to send the message also as input variable in servlet.
    Whether it is write Way to represent hole table body into message variable in jsp page.
    Please help me.
    Thanks and Regards
    haresh
    Edited by: HARSHAL_GURAV on Aug 13, 2008 11:15 PM
    Edited by: HARSHAL_GURAV on Aug 13, 2008 11:56 PM

    Hi bshannon ,
    Thanks you very much for your reply.
    I am trying to send html formated mail to the user.
    The message body contains the table that is displayed in above jsp page as:
    <table border="1" cellpadding="2" cellspacing="3" bgcolor="#E6E6FA" align="center"><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>
    <tr><td><%=rs.getString("Qserialno") + "." + rs.getString("questionname")%></td>
    <td><%=noA%></td><td><%=noB%></td><td><%=noC%></td><td><%=noD%></td></tr>In above code I am displaying the data from table i jsp page in table format. The data is related to analysis of particular event and i am trying to send this data as message body of the email.
    As table displayed in html form can you assist me in how to send html data?
    I am using variable message to store all this table data .
    <%  message="<table border=1 cellpadding=2 cellspacing=3 bgcolor=#E6E6FA align=center><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>";%>
    message=message+"<tr><td>"+rs.getString("Qserialno") + "." + rs.getString("questionname")+"</td>";
      message=message+"<td>"+noA+"</td><td>"+noB+"</td><td>"+noC+"</td><td>"+noD+"</td></tr></table>";i am sending this variable through form.At servlet I am retrieving it like:
    String s1 = request.getParameter("to");
               String s2 = request.getParameter("from");
               //String s3 = request.getParameter("sub");
               *String s4 = request.getParameter("message");*Will this possible ?
    Please help meas i am troubling same with last from 7-8 days.
    I had gone through Faqs but unable to collect required information.
    Thanks and Regards
    Haresh
    Edited by: HARSHAL_GURAV on Aug 15, 2008 9:22 PM

  • How to read the message body in a mail

    how can we read the message body of a mail. i am using pop3 server for reading the mails. my program is
    public class GetMessageExample {
    public static void main (String args[]) throws Exception {
    String host = args[0];
    String username = args[1];
    String password = args[2];
    Properties props = new Properties();
    Session session = Session.getInstance(props, null);
    Store store = session.getStore("pop3");
    store.connect(host, username, password);
    Folder folder = store.getFolder("INBOX");
    folder.open(Folder.READ_ONLY);
    BufferedReader reader = new BufferedReader (
    new InputStreamReader(System.in));
    Message message[] = folder.getMessages();
    for (int i=0, n=message.length; i<n; i++) {
    System.out.println(i + ": " + message.getFrom()[0]
    + "\t" + message[i].getSubject());
    System.out.println(
    "Do you want to read message? [YES to read/QUIT to end]");
    String line = reader.readLine();
    if ("YES".equals(line)) {
    message[i].writeTo(System.out);
    } else if ("QUIT".equals(line)) {
    break;
    folder.close(false);
    store.close();
    i am getting the following exception
    Exception in thread "main" java.lang.NoSuchFieldError: contentStream
    at com.sun.mail.pop3.POP3Message.getContentStream(POP3Message.java:115)
    at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSou
    rce.java:61)
    at com.sun.mail.handlers.text_plain.getContent(text_plain.java:65)
    at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.
    java:755)
    at javax.activation.DataHandler.getContent(DataHandler.java:511)
    at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1072)

    The Part interface that the Message class implements describes 3 ways for getting the content of a message. To use an Input Stream, you can call the getInputStream() method on the message itself, rather than System.in.
    Hope this helps!

Maybe you are looking for