Retrieve message body in HttpRequest object

I need to retrieve the message body in HttpRequest object.
How to do that?
Can you help me in this regard

You want to store just the message body, not the entire message?
What do you want to do with multipart messages?
Wouldn't it be simpler to just store the Message object itself?

Similar Messages

  • Retrieve Message body from an appoitment by SOAP

    Hello,
    I am trying to retrieve all the appointment from a specific user by GWSOAP. I use the getItemsRequest method. I specify as container the Appointment folder.
    I retrieve all the appointment. But I cannot retrieve the message body from the appointment. Anybody can help me and explain me how I can retrieve it ?
    Thanks,
    Sebastien

    By default, only the data from the user item in the
    user's database is returned. The user item is linked
    to a common item (that all users share). That common
    item has links to the attachments of the item (which
    the message body is one).
    In the view, you have to explicitly ask for attachments
    / message body. A common view is:
    "default attachments message peek"
    default - Get all of the fields of the user's item.
    attachments - Return the information about the attachments.
    Note: You then have to read the attachment
    data separately.
    message - Return the message body.
    Note: If the message body is greater than 64KB,
    you will only get the id of the message body.
    You will need to read the message body the
    same way you read the other attachments.
    peek - Return the message body, but don't mark the item as
    read.
    Note: If you are reading more that about 20 items, you should
    use the cursor calls instead of getItemsRequest.
    There is more information in the documentation.
    Preston
    >>> On Tuesday, October 05, 2010 at 1:36 AM,
    Sebastienp<[email protected]> wrote:
    > Hello,
    >
    > I am trying to retrieve all the appointment from a specific user by
    > GWSOAP. I use the getItemsRequest method. I specify as container the
    > Appointment folder.
    >
    > I retrieve all the appointment. But I cannot retrieve the message body
    > from the appointment. Anybody can help me and explain me how I can
    > retrieve it ?
    >
    > Thanks,
    >
    > Sebastien

  • Using httprequest object

    I'm a struts frame work developer and I'm trying to populate combobox using httprequest object. The code seems working( I debugged it) don't populate the combo. My code is as follows.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/salIncrement.tld" prefix="salIncrement" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/emplContext.tld" prefix="emplContext" %>
    <html:html>
    <HEAD>
    <%@ page
    language="java" pageEncoding="utf-8"
    contentType="text/html; charset=utf-8"
    errorPage="error.jsp"
    isErrorPage="false"
    %>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <META name="GENERATOR" content="IBM WebSphere Studio">
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="theme/Master.css" rel="stylesheet" type="text/css">
    <TITLE>salaryIncrement.jsp</TITLE>
    <script language="JavaScript">
    function up(cd){
    var code=cd.value;
         var request = null;
         request =new ActiveXObject("Msxml2.XMLHTTP");
    request.open("GET","emplSalaryIncrement.jsp?structureCode="+code);          
         request.send(null);
    </script>
    </HEAD>
    <BODY>
    <html:javascript formName="salaryIncrementForm"/>
    <html:form action="/newSalaryIncrement.do" onsubmit=" return validateSalaryIncrementForm(this);">
    <TABLE width="100%">
         <TR>
         <TD class="formheader">
              <bean:message key="SalaryIncrement.Title"/>
         </TD>
         </TR>
    </TABLE>
    <TABLE>
    <TR>     
         <TH><bean:message key="SalaryIncrement.SalaryStructure" /> </TH>
         <TD width="50%">
    <select size='1' name='salaryStructure' style='width: 99%' style='font-size: 8pt;font-family: visual GeezUnicode'      onchange='up(this)'>
         <option value="001">one </option>
         <option value="002">two</option>
    </select>
              </TD>
    </TR>
    <TR>     
         <TH><bean:message key="SalaryIncrement.Grade" /> </TH>
         <TD>
         <%
         String salaryStructure="";
         salaryStructure=request.getParameter("structureCode");
              String language=locale.getLanguage();
              int count=0,i=0;
              HashMap param=new HashMap();
         if(!salaryStructure.equals(null)&&!salaryStructure.equals("")){
              param.put("Code",salaryStructure);
              param.put("locale",language);
              ResultSet rs= DataSourceFactory.instance().getDataSource().select("getServiceType",param);%>
              <select size='1' name='jobGrade' style='width: 99%' style='font-size: 8pt;font-family: visual Geez Unicode'>     
              <%while(rs.next()){%>
    <option value="<%=rs.getString("Code"));%>"><%=rs.getString("Description"));%> </option>
              <% }%>
         <%}else{%>
         <select size='1' name='jobGrade' style='width: 99%' style='font-size: 8pt;font-family: visual Geez Unicode'>     
    <option value=""></option>
         <%}%>
         </select>
    </TD>
    </TR>
    </TABLE>
    </html:form>
    </BODY>
    </html:html>

    You're in the wrong forum, try: http://forum.java.sun.com/forum.jspa?forumID=45

  • EWS 1.2, Exchange 2010 SP2/SP3 - Appointment message body gets wrecked on update

    We're seeing a very irritating issue with EWS and Exchange when updating the message body on an Appointment. To head it off, it does not appear to be the bug detailed here:
    http://blogs.msdn.com/b/dhruvkh/archive/2012/05/18/sending-appointments-from-ews-apps-where-did-my-html-go.aspx
    It happens on both 2010 SP2 and SP3. We're creating Appointments with some HTML formatting the message body. Nothing fancy, just a few tables and a little bit of inline styling (since a css style header disappears into a black hole when you try to use it
    as part of the Appointment message body). We're able to make a nice-looking message body that goes out in the meeting requests. Well, with the exception of downlevel text at the top, but there doesn't seem to be much we can do about that short of a double-tap
    save.
    The problem comes into play if we need to update the message body on the Appointment. All of this is automated, so the user cannot directly edit it. If we make any changes to the message body, it completely wrecks the HTML. It's still an HTML-formatted message,
    but much of the styling is lost and it looks awful. This happens without fail when we alter the message body of an Appointment with any considerable level of HTML formatting. BodyType is HTML, of course. I've done some digging on the best body algorithm and
    some of the MAPI properties related to it. Some interesting bits of note:
    When the Appointment is first saved, PidTagRtfInSync is true. PidTagNativeBody is 2, which indicates an RTF message. PidTagBody is present. PidTagRtfCompressed is present. However, PidTagBodyHtml is not present. After updating the Appointment with a message
    body edit, PidTagBodyHtml is present, but now PidTagRtfInSync is false and PidTagNativeBody is 3.
    If PidTagBodyHtml is set directly as an extended property instead of setting the message body via the EWS Appointment object, then the formatting is wrecked right out of the gate. At least it's consistent that way...
    Attempting to set PidTagNativeBody manually had no effect.
    When viewing the PR_BODY_HTML contents between a good and bad message, the good one will contain the transformed HTML. It doesn't look much like what we had initially handed to it, but gets changed in the conversion process. The bad one is much closer to
    what we wrote in actual HTML, but has still had much of the styling removed. It's as if creating the Appointment does the RTF conversion, but any subsequent changes use a completely different code path serverside and there does not appear to be any way around
    it short of even more guess and check with EWS and Exchange chewing up HTML. This is complicated by being unable to find any documentation that details how and what gets changed, discarded, etc in the process.
    This will always affect requests, but only seems to affect Appointments in the calendar of attendees if the body includes the downlevel text. Appointments without the downlevel text appear to survive updates with their formatting intact. Appointments with
    downlevel text get their formatting wrecked with updates.
    Has anyone run into this before? It was painful enough when we found that our previously-used email HTML formatter wouldn't work with EWS and everything had to be inlined, but now it seems that there are even more inexplicable problems to get around. Is
    there a way to update the message body without this happening?

    Ugh... hopefully I can ask you gentleman how to solve my issue.
    I recently implemented code to allow our users to turn-on HTML-encoding for when our Sync'ing app goes to add/update items for them into Exchange.
    If thev'ye turned-on HTML formatting, when I create a CalendarItemType's (in C# based off the EWSProxies.EWS.Itemtype) the Body.Value is being set with a string which contains very minimal HTML tags... just <br>'s instead of "\r\n" and for
    URL link values we are embedding into the text, I'm encapsulating those within an <a href> 
    Example: <a href="http://TheWebSite.com/EventDisplay.aspx?uri=1234">Event Display Link</a>
    My problem is... when I retrieve an item from Exchange... there is a huge amount of extra HTML encoding it wraps around everything! 
    By inspecting in the debugger... I've discerned that :
    For Appts... the main bunch of text that I inserted in an item when originally creating it is contained just within the <div> tag.
    For Tasks... the main bunch of text that I inserted in an item when originally creating it is contained just within the <body> tag (and on these there is no <div> tag created).
    I was able to use the HTML Agility Pack and load this Body.Value string into the enhanced HtmlDocument object.  I first attempt to parse first for the <div> nodes contents. If the <div> is not-null that's an Appt.  If the <div>
    is null, I instead parse out the <body> nodes contents, and those are Tasks.
    I noticed for Appts :
    For every <br> tag I had in my original text.. it appends two consecutive "\r\n" 's after it!  No problem I can just do a Replace("\r\n", "")  and zap those. But then the <a href> I have in there... it
    encapsulates it with a <font> node where it sets a color for the link and also an underline <u> node.  I can handle the <u> nodes easy enough with a Replace("<u>","") and a Replace("</u>", ""); 
    But what about the damn <font> node?  It's in the format of <font color=\"blue\"></font> and I'm sure the \"blue"\ part could be different for every user.
    I noticed for Tasks :
    It prepends a "\r\n" just inside the begininng<body> tag. Each of the original <br> tags gets an "\r\n" appended behind it.  and for the TaskType for the <a href> node IT DOES NOT encapsulate it with the <font>
    and <u> nodes as it does for the Appt.
    How can I stop it from changing the Body content when retrieving it?  Will it not change anything if I go the extra mile and make sure to wrap everything with an <html> and <body> node when initially creating the items?
    Any and all help on this issue is sorely appreciated.
    Thank You,
    -G

  • 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

  • Retrieving messages from MQ Series

    Hi,
    We have the situation where we need to receive messages from our partner, who only can use MQ Series to send them. So we are looking into ways how to solve it on our end, which is on a Unix server. We will only read messages, and the other side will be a black box for us which will provide us with settings to connect to their manager.
    Do we need to install a client software (which IBM seems to provide for free) and on top of that use a Java API? Or do we use JMS on top of the client?
    Or if we use JMS, isn't the client needed?
    Thanks

    Hi
    I am trying to read messages from the MQ using the following code.
    The queue used by this program is shared, msg is pushed other program and this progam fetch the msg and save it physically.
    I m facing a problem, say there are 15 messages, then 15 files should be created, some time it creates 15 files one for each message, while some times it creates less then 15 files.
    String messageType = null;
              String docId = null;
              String idocData = null;
              String fileName = null;
              String msgId = null;
              try {
                   // Create a queue manager object and access the queue
         // that will be used for getting the messages.
                   qMgr = new MQQueueManager(qManager, env);
                   //int openOptions = MQC.MQOO_INPUT_EXCLUSIVE | MQC.MQOO_BROWSE | MQC.MQOO_INQUIRE;
                   int openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_BROWSE | MQC.MQOO_INQUIRE | MQC.MQOO_FAIL_IF_QUIESCING;
                   queue = qMgr.accessQueue(qName, openOptions, null, null, null);
                   MQGetMessageOptions gmo = new MQGetMessageOptions();
                   // Get the count of messages present into Queue.
                   int messageCnt = queue.getCurrentDepth();
                   _logger.info("Current Depth of MQ is : "+ messageCnt);
                   if (messageCnt > cnt && cnt != 0) {
                        messageCnt = cnt;
                   // If count is greater than Zero then get the message from Queue
                   // and creates the file under the target folder.               
                   if (messageCnt > 0) {
                        for (int i = 0; i < messageCnt; i++) {
                             _logger.info("Depth of MQ Before reading : "+ queue.getCurrentDepth());
                             messageType = "";
                             docId = "";
                             idocData = "";
                             fileName = "";
                             msgId = "";
                             MQMessage message = new MQMessage();
                             queue.get(message, gmo);
                             byte[] data = new byte[message.getMessageLength()];
                             String msg = null;
                             message.readFully(data);
                             _logger.info("Getting File  : "+ (i+1));
                             try {
                                  msg = new String(data);
                                  messageType = msg.substring(147, 177).trim();
                                  docId = msg.substring(121, 137).trim();
                                  idocData = msg.substring(108, msg.length());                              
                                  msgId = String.valueOf(System.currentTimeMillis());
                                  // Getting inbox folder path                              
                                  if (messageType.trim().equalsIgnoreCase("INVOIC01")) {
                                       targetFolder = BOCConfig.getProperty("invoice.inbox.folder");
                                  } else if (messageType.trim().equalsIgnoreCase("DELVRY03")) {
                                       targetFolder = BOCConfig.getProperty("asn.inbox.folder");
                                  fileName = createFile(idocData, msgId, messageType, targetFolder);                              
                                  _logger.info("File Created no " + (i+1) +" with msgId " + msgId + " messageType " + messageType + " DocId " +docId);                              
                                  _logger.info("Depth of MQ After reading : "+ queue.getCurrentDepth());
                             } catch (NullPointerException ne) {
                                  String strMsg = "Edgeware got junk or null message from MQ which is not proceed by MQ Adapter.";
                                  fileName = createFile(idocData, msgId, messageType, failedFolder);
                                  raiseAlert(strMsg, messageType, docId, fileName, ne.getMessage());                              
                             } catch (StringIndexOutOfBoundsException siobe) {
                                  String strMsg = "Edgeware got invalid message from MQ which is not handled by MQ Adapter.";
                                  fileName = createFile(idocData, msgId, messageType, failedFolder);
                                  raiseAlert(strMsg, messageType, docId, fileName, siobe.getMessage());                         
                             } catch (Exception e) {
                                  String strMsg = "Edgeware got error while creating idoc file or DB transction";
                                  fileName = createFile(idocData, msgId, messageType, failedFolder);
                                  raiseAlert(strMsg, messageType, docId, fileName, e.getMessage());
                   // closing the queue.
                   queue.close();
              } catch (MQException ex) {
                   String strMsg = "Edgeware got MQ Error while connecting/retrieving message from Queue";
                   String err = "MQ exception: CC = " + ex.completionCode + " RC = " + ex.reasonCode;               
                   raiseAlert(strMsg, messageType, docId, failedFolder, err);
              } catch (IOException e) {
                   String strMsg = "Edgeware got MQ Error while reading message from the Queue";               
                   raiseAlert(strMsg, messageType, docId, failedFolder, e.getMessage());               
              }catch (Throwable th) {
                   String strMsg = "Edgeware got Runtime Exception";               
                   raiseAlert(strMsg, messageType, docId, failedFolder, th.getMessage());               
              }

  • Send email including the data field into the html message body

    Hi all,
    I would like to send an email to each recipient once only, and including a data field into the html body message. I am not sure how to achive that with my current stored procedure.
    USE [CallManager]
    GO
    /****** Object: StoredProcedure [dbo].[PersonalCallsReminder] Script Date: 08/27/2014 10:26:55 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: <Author,,Name>
    -- Create date: <Create Date,,>
    -- Description: <Description,,>
    -- =============================================
    ALTER PROCEDURE [dbo].[PersonalCallsReminder]
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    -- Email Users
    declare @email varchar(max)
    declare mycursor cursor FAST_FORWARD for
    SELECT dbo.HumersStaffExtension.email
    FROM dbo.Calls_Mobile_Header INNER JOIN
    dbo.HumersStaffExtension ON
    dbo.Calls_Mobile_Header.TelNumber = dbo.HumersStaffExtension.telnr_prv COLLATE SQL_Latin1_General_CP1_CI_AS
    GROUP BY dbo.Calls_Mobile_Header.RecordStatus, dbo.HumersStaffExtension.usr_id, dbo.HumersStaffExtension.email,
    dbo.HumersStaffExtension.res_id
    HAVING (dbo.Calls_Mobile_Header.RecordStatus = N'0') AND (NOT (dbo.HumersStaffExtension.email IS NULL))
    OPEN mycursor;
    FETCH NEXT FROM mycursor
    INTO @email
    WHILE @@FETCH_STATUS = 0
    BEGIN
    EXEC msdb.dbo.sp_send_dbmail
    @profile_name = 'CallsManagement',
    @recipients = @email ,
    @body_format = 'HTML',
    @subject = 'Personal Calls Reminder',
    @body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Personal Calls Reminder</title>
    <style type="text/css">
    body {
    font-family: "Times New Roman", Times, serif;
    font-size: 11pt;
    .auto-style1 {
    background-color: #FFFF00;
    </style>
    </head>
    <body>
    <div>
    <table style="width: 800px">
    <tr>
    <td>Dear,<br />
    <br />
    Please review your phone bills and submit your personal calls using the following link:<br />
    <a href="http://companyxyz/personalcalls/">Personal Calls</a></td>
    </tr>
    </table>
    <br/>
    <table style="width: 800px">
    <tr>
    <td><strong>Kindly be informed that the deadline to process new bills is on the
    <span class="auto-style1">15th of each month</span>.</strong></td>
    </tr>
    </table>
    <br/>
    <table style="width: 800px">
    <tr>
    <td>For assistance, please contact <a href="mailto:[email protected]">[email protected]</a></td>
    </tr>
    </table>
    <br/>
    <table style="width: 800px">
    <tr>
    <td><strong>*** This is an automatically generated email, please do not reply ***</strong></td>
    </tr>
    </table>
    </div>
    </body>
    </html>
    FETCH NEXT FROM mycursor
    INTO @email
    END
    CLOSE mycursor;
    DEALLOCATE mycursor;
    END
    Changing the query to the following:
    SELECT TOP (100) PERCENT dbo.HumersStaffExtension.email, dbo.Calls_Mobile_Header.ExtractDate
    FROM dbo.Calls_Mobile_Header INNER JOIN
    dbo.HumersStaffExtension ON
    dbo.Calls_Mobile_Header.TelNumber = dbo.HumersStaffExtension.telnr_prv COLLATE SQL_Latin1_General_CP1_CI_AS
    GROUP BY dbo.Calls_Mobile_Header.RecordStatus, dbo.HumersStaffExtension.usr_id, dbo.HumersStaffExtension.email, dbo.HumersStaffExtension.res_id,
    dbo.Calls_Mobile_Header.ExtractDate
    HAVING (dbo.Calls_Mobile_Header.RecordStatus = N'0') AND (NOT (dbo.HumersStaffExtension.email IS NULL))
    ORDER BY dbo.HumersStaffExtension.email
    Will provide me with the following results:
    email ExtractDate
    [email protected]
    July-2014
    [email protected]
    August-2014
    [email protected]
    July-2014
    [email protected]
    August-2014
    Is it possible to send email to [email protected] once only including in the html message body the ExtractDate field results for July-2014 and August-2014? 
    I appreciate any assist on the issue.
    Thank you in advance.

    Refer the below code highlighted in bold.
    USE [CallManager]
    GO
    /****** Object:  StoredProcedure [dbo].[PersonalCallsReminder]    Script Date: 08/27/2014 10:26:55 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author:  <Author,,Name>
    -- Create date: <Create Date,,>
    -- Description: <Description,,>
    -- =============================================
    ALTER PROCEDURE [dbo].[PersonalCallsReminder]
    AS
    BEGIN
     -- SET NOCOUNT ON added to prevent extra result sets from
     -- interfering with SELECT statements.
     SET NOCOUNT ON;
     -- Email Users
    declare @email varchar(max),@date datetime
    declare @temp table (email varchar(50), extractDate datetime)
    insert into @temp
      SELECT     TOP (100) PERCENT dbo.HumersStaffExtension.email, dbo.Calls_Mobile_Header.ExtractDate
      FROM         dbo.Calls_Mobile_Header INNER JOIN
             dbo.HumersStaffExtension ON
             dbo.Calls_Mobile_Header.TelNumber = dbo.HumersStaffExtension.telnr_prv COLLATE SQL_Latin1_General_CP1_CI_AS
      GROUP BY dbo.Calls_Mobile_Header.RecordStatus, dbo.HumersStaffExtension.usr_id, dbo.HumersStaffExtension.email, dbo.HumersStaffExtension.res_id,
             dbo.Calls_Mobile_Header.ExtractDate
      HAVING      (dbo.Calls_Mobile_Header.RecordStatus = N'0') AND (NOT (dbo.HumersStaffExtension.email IS NULL))
      ORDER BY dbo.HumersStaffExtension.email
    declare mycursor cursor FAST_FORWARD for SELECT DISTINCT email from @temp
    OPEN mycursor;
    FETCH NEXT FROM mycursor
    INTO @email
    WHILE @@FETCH_STATUS = 0
    BEGIN
        DECLARE @date nvarchar(200)
        SELECT @date=Stuff((SELECT ',' + [extractDate]
                  FROM   @temp  where email = @email
                  FOR xml path('')), 1, 1, '')
           EXEC msdb.dbo.sp_send_dbmail
                @profile_name = 'CallsManagement',
                @recipients = @email ,
                @body_format = 'HTML',
                @subject = 'Personal Calls Reminder',
                @body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Personal Calls Reminder</title>
    <style type="text/css">
     body {
     font-family: "Times New Roman", Times, serif;
     font-size: 11pt;
    .auto-style1 {
     background-color: #FFFF00;
    </style>
    </head>
    <body>
    <div>Extract Date : ' + @date + '</div>
    <div>
     <table style="width: 800px">
      <tr>
       <td>Dear,<br />
       <br />
       Please review your phone bills and submit your personal calls using the following link:<br />
       <a href="Personal">http://companyxyz/personalcalls/">Personal Calls</a></td>
      </tr>
     </table> 
     <br/>
     <table style="width: 800px">
      <tr>
       <td><strong>Kindly be informed that the deadline to process new bills is on the
       <span class="auto-style1">15th of each month</span>.</strong></td>
      </tr>
     </table>
     <br/>
     <table style="width: 800px">
      <tr>
       <td>For assistance, please contact <a href="[email protected]:[email protected]">[email protected]</a></td>
      </tr>
     </table>
     <br/>
     <table style="width: 800px">
     <tr>
     <td><strong>*** This is an automatically generated email, please do not reply ***</strong></td>
     </tr>
     </table>
    </div>
    </body>
    </html>
          FETCH NEXT FROM mycursor
          INTO @email
    END
    CLOSE mycursor;
    DEALLOCATE mycursor;
    END
    Regards, RSingh

  • Store and Retrieve Messages

    I have problem in storing and retrieving messages from Vector
    Following Issues:
    1. In SendMessage() method am i using correct way to store messages in vector
    2. If my ist step is right then how what should i do in retrieveMessage() method
    public void sendMessage(IChatClient client,String msg) throws RemoteException
    if(!clients.contains(client))
    return;
    else
    // Send the message to all clients //
    for(int i=0;i<clients.size();i++)
    String user=client.getName();
    System.out.println(user+"has been connected");
    ((IChatClient)clients.elementAt(i)).sendMessage(user+" : "+msg);
    clients.addElement(msg);
    public  void RetrieveMessage(String msgs) throws RemoteException
         }I am at the end of my complete ChatRoom if i get help will be really appreciated

    ((IChatClient)clients.elementAt(i)).sendMessage(user+" : "+msg);
    clients.addElement(msg);
    you should get a ClassCastException:
    What are you storing in the "clients" vector? it appear you have mix
    String and IChatClient in the vector;
    for (int i = 0; i < clients.size(); i++){
        Object obj = clients.get(i);
        if (obj instanceof IChatClient)
            IChatClient client = (IChatClient) obj;
        else if (obj instanceof String)
            String msg = (String) obj;
    }you should not mix type in a collection. it will just makes thing much difficult (read, write, maintain, etc..)

  • CFPOP error -- java string in message body

    I'm using CFPOP to do a very typical pop mail check and then
    I throw the message parts into a few fields in a database: subject,
    body, and also textbody and htmlbody if the message comes through
    as multi-part. I got a very weird row in the database this morning.
    Subject looks good, but the body of the message is:
    "javax.mail.internet.MimeMultipart@12496a" and the textbody and
    htmlbody fields are blank. I also pull down attachments into a
    folder and there were no attachments for this message. Any ideas
    what this means and what might have happened to the message body?
    Thanks in advance. -Rachel

    Getting
    javax.mail.internet.MimeMultipart@12496a is indeed odd. It
    looks like the memory address of a
    MimeMultipart
    object.
    Such an object may embody plain text body, HMTL body and
    attachments, each separated from the others by a so-called
    boundary. Perhaps the message did not have clear boundaries between
    the parts. Or it might have contained a part having a MIME type
    that Coldfusion does not recognize.

  • Want to add data from ztable into WF message Body

    Dear all,
    I have a requirement where i have to display data from z table in to Workflow message body.
    Please help with steps to Define Table for import and export parameter in method and standard task.
    Regards,
    Gaurav

    Hi Gaurav,
    Create a method and create the parameter with Export option. Also create the same container with the workflow with import option. Data type of the both container's should be same.
    Then in the method write the code to populate the container. Once the code is done, then test the method in SWO1. Your export parameter should be populated with the required data.
    If it fine, then create a activity step in the workflow and define you business object and method. It will ask for binding, then bind the Method -> Task binding and Task -> Workflow binding.
    If binding is fine, then your data from method will passed to the workflow .
    Also please do the search in SDN.
    Thanks,
    Viji.

  • Web-UI error message "Access via 'NULL' object reference not possible"

    I need some help, I'm not a Basis person but I need to get this connection problem resolve.
    This problem is in our DEV ICWeb system.  After logging in to Web-UI, I got a error message "Access via 'NULL' object reference not possible".  We have 3 clients (100, 220, & 310) in DEV and all 3 clients are giving me the same error message.
    From the help.sap.com, I found this topic http://help.sap.com/saphelp_nwes70/helpdata/en/84/43f0d786304e19a652a8f80909a8ec/content.htm
    but in the document it asked to go to SM59 to check the ESH_APPL_WS_TEMPLATEENGINE destination.  But we don't have that destination setup in all our systems.
    Here is the complete error message:
    Error when processing your request
    What has happened?
    The URL http://crm-dev.staff.copa:8000/sap/bc/bsp/sap/crm_ui_frame/BSPWDApplication.do was not called due to an error.
    Note
    ■The following error text was processed in the system CD1 : Access via 'NULL' object reference not possible.
    ■The error occurred on the application server CRM-DEV_CD1_00 and in the work process 0 .
    ■The termination type was: RABAX_STATE
    ■The ABAP call stack was:
    Method: GET_DATA_LOSS_HANDLER of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
    Method: GET_DATA_LOSS_HANDLER of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
    Method: EH_TRIGGER_NAVIGATION of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
    Method: SET_WORKAREA_CONTENT of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
    Method: PROCESS_NAV_QUEUE of program CL_BSP_WD_VIEW_MANAGER========CP
    Method: DO_INIT of program CL_CRM_UI_FRAME_APP_CONTROLLERCP
    Method: DO_INIT of program CL_BSP_CTRL_ADAPTER===========CP
    Method: GET_PAGE_CONTEXT_CURRENT of program CL_BSP_CONTEXT================CP
    Method: ON_REQUEST_ENTER of program CL_BSP_RUNTIME================CP
    Method: ON_REQUEST of program CL_BSP_RUNTIME================CP
    What can I do?
    ■If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system CD1 in transaction ST22.
    ■If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server CRM-DEV_CD1_00 in transaction SM21.

    Hi Michael,
    Refer to the link below and check the procedure.
    http://help.sap.com/saphelp_nwes70/helpdata/en/84/43f0d786304e19a652a8f80909a8ec/content.htm
    Regards,
    Arjun

  • 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

  • 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.

  • 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

Maybe you are looking for

  • ITunes won't sync music to my iphone.

         A little context. I've always shared an itunes account with my cousin and all our songs would be the same. But to make this possible i would have to meet him and sync my iphone on his computer. But i have my own computer now with alot of differe

  • I keep getting an redirect error message.

    Hi all, I keep getting this message on my desktop computer: "The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused

  • Not able to create new disk or attach disk to windows 2008

    Hi All, Since a couple of days I cannot add any disk to my existing windows 2008 install. I have added and 50 Gb disk but is does not exist once windows started (not in the disk management console) The vm.cfg looks fine see: [root@nlicm18 1235_w2008d

  • I want to delete my account

    So I got to contact someone to do it so can someone do it for me like right now? I dont want to use skype anymore.

  • SAP Treasury and FSCM certification

    Hello All, Iam planing to do certification in SAP Treasury and certification in SAP FSCM. I was not able to find the coresponding exam codes in the SAP certification list. Iam not sure iam not searching properly or they dont have any of certification