Outllook clients sending partial messages / truncated email body

I am stumped on this one and could use a little help.
Several clients are experiencing partially truncated emails both sent and received.
It is happening on Outlook 2003 and 2010.
The Sent Items folder also shows the truncated email.
For instance, lets say I, Mike, type out a 1000 word email to my friend Jane.  Jane receives an email that might only have a few sentences and it might cut off right in the middle of a sentence.  I check my Sent Items and it only shows exactly what
Jane received which is much less than I typed.  Most of my text has simply disappeared.
I see others with similar issues but it is usually the entire message body that is missing, not partial text missing.
I have opened the sent item using the web interface and it is the same problem.
The Exchange server is 2010 Standard Edition running on Windows Server 2008 R2 and I recently updated all OS patches, Exchange SP3 and Update Rollup 4 for SP3 and my issue remains.
I have documented at least 1 case where the sender and receiver both have Outlook 2010, although most of my users have Outlook 2003.
In addition to all the troubleshooting listed above, I have also used every known to me AV scanning tool such as Combofix, RKILL, TDSkiller, MalwareBytes, HitmanPro etc..  Nothing out of the ordinary found. 
ANY help at all would be greatly appreciated!!!!
Thanks
Also, here is a IT admin on another forum with the same issue.  I am copying the text from my post over at experts-exchange
Same here. Exchange 2010 Standard 14.3 build 123.4 in a Win2008R2 SP1 with all latest updates installed.
Also this user in this thread has the same problem: Outgoing emails truncated.
After I read his thread and your thread, I think that it isn't an isolated problem...
Outgoing messages bodies are truncated. When it happens, only few words or few sentences remained. The rest of the typed text disappeared.
Affected messages are shown truncated in Outlook and also in OWA sent emails.
The problem began 2 weeks ago, but now it's spreading.
For now it seems in my company that only Outlook 2003 clients are affected.
At the beginning only 1 person reported me the problem, so I thought it was an isolated client problem. I tried to reinstall Outlook 2003, but it continued. Then I tried to install Outlook 2010 for troubleshooting purpose, and in the last week that person didn't
reported me any problem.
Then it began to spread. It happened to a different person. And then to another one. At the moment, 5 persons reported it. All these persons have Outlook 2003.
Maybe an automatic Windows update could have caused the problem in the clients?
It's hard to find out.
It seems that the problem is present in emails that take a long time to write them. Maybe the affected sent email is the first one auto-saved... For testing I disabled the auto-saving (every 3mn) drafts function in the affected Outlook 2003 clients. They reported
me no problem in the last days.
But I told them to always check sent emails and to continue to do that.
I will report as soon as I have new feedbacks.
Fabio

Turn off "Auto-save messages every XX minutes"
Outlook sends the saved portion, not the entire email.
Note: This partial message is not saved in Drafts, but in memory.
Outlook 2007:
1. On the Tools menu, click Options
2. Make sure you are on the “Preferences” tab.
3. Click the “E-mail Options…” button.
4. Click the “Advanced E-Mail Options…” button (about half way down the window).
5. Uncheck  the first checkbox “AutoSave items every:”
6. Click OK 3 times to close all the windows
Outlook 2010/2013:
On the Tools menu, click Options.
On the Preferences tab, click E-mail Options, and then click
Advanced E-mail Options.
Uncheck the AutoSave items every: x minutes check box.
In the minutes list, specify how often you want the program to save your data and the program state.
If you set more minutes in there, you only postpone the issue. 
Turn it off.
Note:  IMHO it is better to lose work and know it, than to think you sent an email when you really did not.
Eric Anderson

Similar Messages

  • Outllook clients sending partial messages, truncated text body

    I am stumped on this one and could use a little help.
    Several clients are experiencing partially truncated emails both sent and received.
    It is happening on Outlook 2003 and 2010.
    The Sent Items folder also shows the truncated email.
    For instance, lets say I, Mike, type out a 1000 word email to my friend Jane.  Jane receives an email that might only have a few sentences and it might cut off right in the middle of a sentence.  I check my Sent Items and it only shows exactly what
    Jane received which is much less than I typed.  Most of my text has simply disappeared.
    I see others with similar issues but it is usually the entire message body that is missing, not partial text missing.
    I have opened the sent item using the web interface and it is the same problem.
    The Exchange server is 2010 Standard Edition running on Windows Server 2008 R2 and I recently updated all OS patches, Exchange SP3 and Update Rollup 4 for SP3 and my issue remains.
    Also, I have documented at least 1 case where the sender and receiver both have Outlook 2010, although most of my users have Outlook 2003.
    In addition to all the troubleshooting listed above, I have also used every known to me AV scanning tool such as Combofix, RKILL, TDSkiller, MalwareBytes, HitmanPro etc..  Nothing out of the ordinary found.
    Here is a comment from someone else with the same issue.  This was copied from Experts-Exchange.com
    Same here. Exchange 2010 Standard 14.3 build 123.4 in a Win2008R2 SP1 with all latest updates installed.
    Also this user in this thread has the same problem: Outgoing emails truncated.
    After I read his thread and your thread, I think that it isn't an isolated problem...
    Outgoing messages bodies are truncated. When it happens, only few words or few sentences remained. The rest of the typed text disappeared.
    Affected messages are shown truncated in Outlook and also in OWA sent emails.
    The problem began 2 weeks ago, but now it's spreading.
    For now it seems in my company that only Outlook 2003 clients are affected.
    At the beginning only 1 person reported me the problem, so I thought it was an isolated client problem. I tried to reinstall Outlook 2003, but it continued. Then I tried to install Outlook 2010 for troubleshooting purpose, and in the last week that person didn't
    reported me any problem.
    Then it began to spread. It happened to a different person. And then to another one. At the moment, 5 persons reported it. All these persons have Outlook 2003.
    Maybe an automatic Windows update could have caused the problem in the clients?
    It's hard to find out.
    It seems that the problem is present in emails that take a long time to write them. Maybe the affected sent email is the first one auto-saved... For testing I disabled the auto-saving (every 3mn) drafts function in the affected Outlook 2003 clients. They reported
    me no problem in the last days.
    But I told them to always check sent emails and to continue to do that.
    I will report as soon as I have new feedbacks.
    ANY help at all would be greatly appreciated!!!!
    Thanks

    Turn off "Auto-save messages every XX minutes"
    Outlook sends the saved portion, not the entire email.
    Note: This partial message is not saved in Drafts, but in memory.
    Outlook 2007:
      1. On the Tools menu, click Options
      2. Make sure you are on the “Preferences” tab.
      3. Click the “E-mail Options…” button.
      4. Click the “Advanced E-Mail Options…” button (about half way down the window).
      5. Uncheck  the first checkbox “AutoSave items every:”
      6. Click OK 3 times to close all the windows
    Outlook 2010/2013:
    On the Tools menu, click Options.
    On the Preferences tab, click E-mail Options, and then click
    Advanced E-mail Options.
    Uncheck the AutoSave items every: x minutes check box.
    In the minutes list, specify how often you want the program to save your data and the program state.
    If you set more minutes in there, you only postpone the issue. 
    Turn it off.
    Note:  IMHO it is better to lose work and know it, than to think you sent an email when you really did not.
    Eric Anderson

  • Not able to see the output in sost when sending the image in email body

    I am sending the image in email body and when m trying to see the output in SOST then it showing a page 'you are not connected to the internet'
    I am able to see the output when m saving local objects but when m saving it in some package its showing me this page
    Kindly help it
    Regards
    Pratham Kapoor

    Hello Prakash,
    Thanks for the reply
    I am able to see the mail in SOST but when I click on the Display Document to see the content of the mail then I am getting this error of 'you are not connected to the internet'
    My Program is to put the logo in my email body
    I am sending you the attached image

  • Sending text messages to email addresses

    With my previous (dumb) Samsung phone I used to send text messages to email addresses all the time and everything was fine. Now, it turns out that when I send a text message to an email address with my iPhone 4 the phone sends it as MMS instead of text, and the problem with that is that my provider (Bell Canada) charges me extra for these MMS messages. I do not normally use picture or video messaging, but when I'm trying to create a message to an email address with MMS disabled, the phone tells me this cannot be done unless I enable MMS.
    I can receive texts from email addresses just fine and they come in as text messages with no extra charges for me. How can I send a plain text message from iPhone to an email address without going through MMS?

    Dododo, I have your same exact problem, right down to my last cell phone (samsung) that did it perfectly using only my included unlimited texts.
    Has anyone found a solution to this problem? I think it sends them as MMS because bell sends the texts to email from the iphone as words on a notepad-like background that arrives in email as a picture attachment.
    My problem is that I'd like to turn my 3G off when I don't need it, to save my mb's. Therefore sending emails right from the email app is not a viable alternative, when text --> email used to be free on my old, basic cell phone.
    Any suggestions/solutions are appreciated

  • HT1937 i cant send any message to any body

    i cant send any message to any body , there is message said you should anable MMS to send message

    In Settings>Mail do you have Load remote images turn on?
    Do you see an attachment to the message?

  • Sending Status Messages by Email

    I am using Status Filter Rules to send warning and error messages via email from several CM07 sites. The process hasn't been consistent.
    Messages created by the SMS_Distribution_Manager do not send the entire description field where other components do. I have not been able to figure it out.
    I have tried using vbscript and powershell, both give the same results.
    Here is what I am doing for distribution manager emails via vbscript.
    cscript.exe "C:\Scripts\sendMail.vbs" "myemailaaddress" "%msgdesc"
    SendMail.vbs contents:
    Const SMTPServer = "IP Address of SMTP Server" ' SMTP server IP address
    Const From = "From Address"
    Const Subject = "SCCM Package Alert"
    Set objArgs = WScript.Arguments
    If objArgs.count < 2 Then
     ' All arguments are required
     WScript.Quit(1)
    Else
     SendGenericMail objArgs(0), objArgs(1)
    End If
    Sub SendGenericMail (sTo, sMessage)
     On Error Resume Next
     ' Generate TO and CC recipients based on number of e-mail addresses provided.
     If instr(sTo,";") > 1 Then
      sTo_array = Split(sTo,";")
      kokku = UBound(sTo_array)
      For i = 1 to kokku
       If i <> kokku Then
        CCstring = CCstring & sTo_array(i) & ", "
       Else
        CCstring = CCstring & sTo_array(i)
       End If
      Next
      TOstring = sTo_array(0)
     Else
      TOstring = trim(sTo)
     End If
     Set CDO = WScript.CreateObject("CDO.Message")
     CDO.From = From
     CDO.To = TOstring
     CDO.Cc = CCstring
     CDO.Subject = Subject
     CDO.TextBody = sMessage
     CDO.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer
     CDO.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
     CDO.Configuration.Fields.Update
     CDO.Send
    End Sub
    Here is an example of the email body then the full message detail.
    Email Body:
    SMS Distribution Manager failed to process package Law
    Here is the full message detail:
    SMS Distribution Manager failed to process package "Law Civil Image" (package ID = DIT007A9).
    Possible cause: Distribution manager does not have access to either the package source directory or the distribution point.
    Solution: Verify that distribution manager can access the package source directory/distribution point.
    Possible cause: The package source directory contains files with long file names and the total length of the path exceeds the maximum length supported by the operating system.
    Solution: Reduce the number of folders defined for the package, shorten the filename, or consider bundling the files using a compression utility.
    Possible cause: There is not enough disk space available on the site server computer or the distribution point.
    Solution: Verify that there is enough free disk space available on the site server computer and on the distribution point.
    Possible cause: The package source directory contains files that might be in use by an active process.
    Solution: Close any processes that maybe using files in the source directory.  If this failure persists, create an alternate copy of the source directory and update the package source to point to it.
    Email messages from other component sources have the complete description field.
    Can someone tell me what I am doing wrong or what I might be missing?
    Thanks,
    Steve

    Hi,
    You may refer to the following links to check if they help:
    Sending SCCM Status Messages from MDT Scripts.
    Send SCCM task sequence email report
    Regards,
    Sabrina

  • Send printStackTrace() in the email body

    we have a java class that has method for getting status information. Exception handling for this method prints printStackTrace(); We also have email sending routine in this class. I want to send ex.printStackTrace() to the message body. How can I do that? printStackTrace() is a void method and am not able to assign to the string variable. Please help with your suggestions. TIA.
    code sample...
    public class Helper {
    public errmsg;
    public String getStatus() {
    init();
    return status;
    private void init() {
    if (...) {
    try {
    } catch (Exception ex) {
    ex.printStackTrace();
    [want to do errmsg = ex.printStackTrace(); ]
    }

    This should help
    OutputStream buf = new ByteArrayOutputStream();
    PrintStream p = new PrintStream(buf);
    // Where errException is your exception
    errException.printStackTrace(p);
    sendMail.sendError(buf.toString(), true);
    public class SendMail {
         public void sendError(String errorMessage, boolean allowCC){
              // set host server and from - set your to,cc's,from
              String host = ???.EMAILSMTP;
              String from = SystemUser+"@???????.com";
              String cc1 = "??????@????????.com";
              if (!allowCC) {cc1 = "";}
              String to = "??????@??????.com";
              try{
                   // determine location
                   //StackTraceElement[] stack = new Throwable().getStackTrace();
                   //String func = stack[2].getClassName()+"/"+stack[2].getClassName()+"/"+stack[2].getLineNumber();
                   //errorMessage = errorMessage + " \n " + func;
                   // Get system properties
                   Properties props = System.getProperties();
                   // Setup mail server
                   props.put("mail.smtp.host", host);
                   // Get session
                   Session session = Session.getDefaultInstance(props, null);               
                   // set debug on
                   //session.setDebug(true);
                   // Define message
                   MimeMessage message = new MimeMessage(session);
                   // Set the from address
                   message.setFrom(new InternetAddress(from));
                   // Set the to address
                   message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
                   // Set one or more CCs
                   if (!cc1.equals("")) {
                        message.addRecipient(Message.RecipientType.CC, new InternetAddress(cc1));
                   // Set the subject
                   message.setSubject(errorMessage);
                   // Set the date
                   message.setSentDate(new java.util.Date());
                   // Set up root
                   MimeMultipart multipartRoot = new MimeMultipart("mixed");
                   // Create the content multipart for text
                   MimeMultipart mpContent = new MimeMultipart("alternative");
                   // Create a body part to house the multipart/alternative Part
                   MimeBodyPart contentPartRoot = new MimeBodyPart();
                   contentPartRoot.setContent(mpContent);
                   // Add the root body part to the root multipart
                   multipartRoot.addBodyPart(contentPartRoot);
                   // Add text
                   MimeBodyPart mbp1 = new MimeBodyPart();
                   mbp1.setText(errorMessage);
                   mpContent.addBodyPart(mbp1);
                   // Create attachment
                   //BodyPart messageBody = new MimeBodyPart();
                   //FileDataSource fds = new FileDataSource(HomeDirectory + "Log.txt");
                   //messageBody.setDataHandler(new DataHandler(fds));
                   //messageBody.setFileName(fds.getName());
                   //multipartRoot.addBodyPart(messageBody);
                   //add attachment
                   //message.setContent(multipartRoot);
                   message.saveChanges();
                   // Actually send the message
                   Transport.send(message);
              // cannot use showSystemError or will loop here
              catch (AddressException e ){
                   e.printStackTrace();
              catch (SendFailedException e ){
                   e.printStackTrace();
              catch (MessagingException e ){
                   e.printStackTrace();
              catch (Exception e) {
                   e.printStackTrace();
    }rykk
    Message was edited by:
    rykk.

  • How RMI Clients send the message to the server

    i am working in a project where i have to do that when the server send something to client,client can also be able to send the message or something else ect.
    please tell me how i will do this
    email me [email protected]

    The Clients messages to the server are called Callbacks. There is a lotta documenatation for it over the net. So make a search for this key word.

  • Send destination message in email attachment

    I have a source schema(let A) and it is converted into destination schema(let B) through mapping.The destination message is sent to a file location.Now I want to send this destination message in email attachment through c# code.but the destination message
    should be pick up from orchestration not from send file location.
    how it is possible ?

    Are you talking about sending your message as an attachment through the orchestration? Well that is what the SMTP Adapter is for. Refer
    http://winterdom.com/2005/08/smtpadapterinbts2006andhtmlformattedmessages and the official document on SMTP Adapter @http://msdn.microsoft.com/en-us/library/aa578267.aspx
    To receive mails into an orchestration, you should have a POP3 enabled e-mail account, use the POP3 Adapter with the MIME/S-MIME Pipeline Components to pick-up and read the mails from BizTalk.
    Regards.

  • Outlook client sends only attached duplicate emails

    Dear Sir,
    We are using outlook 2007/2010/2013 in our client machine when we send attached document emails file more than
    KB receivers got more than 5 to 8 emails. Tell me the Solution for this problem
    Happens only in windows8 client machine only.
    Note: Usually problem happens with bigger mail attachment file only.We are using windows8 64Bit OSMs office 200720102013.Antivirus trend Micro agent
    Kindly Tell me the Solution for this problem.

    Hi,
    I found two related links, It might be caused by two or more Outlook clients are logged into the same mailbox at the same time, or some inappropriate configurations in Outlook.
    Outlook 2010 sending 2 emails when sending a email. (duplicate email)                                 
    http://social.technet.microsoft.com/Forums/office/en-US/8378baff-8c5a-47bc-90a6-8f9c61b2b394/outlook-2010-sending-2-emails-when-sending-a-email-duplicate-email?forum=outlook
    Duplicate Messages in Outlook
    http://blogs.technet.com/b/scotch/archive/2010/04/14/duplicate-messages-in-outlook.aspx
    Hope these can give you some hints , It's recommended to post in this forum if you still have issue about Outlook, they're more familiar with Outlook.
    Outlook IT Pro Forum
    http://social.technet.microsoft.com/Forums/office/en-US/home?forum=outlook
    Yolanda Zhu
    TechNet Community Support

  • FM to send text message external email (without any attachments)

    Hi Guys,
    Can somebody tell me the function module and share the code to send simple text message email to external email.
    Thanks,
    mini

    U can use FM SO_NEW_DOCUMENT_ATT_SEND_API1. For details check this sample code.
    report zmail.
    Parameters
    PARAMETERS: SUB LIKE SOMLRECI1-RECEIVER
                  DEFAULT 'Subject line'.
    PARAMETERS: EAD LIKE SOMLRECI1-RECEIVER." Mail id
    PARAMETERS: L01 LIKE SOLISTI1-LINE
                  DEFAULT 'Body text'.
    PARAMETERS: L02 LIKE SOLISTI1-LINE.
    PARAMETERS: L03 LIKE SOLISTI1-LINE.
    PARAMETERS: L04 LIKE SOLISTI1-LINE.
    PARAMETERS: L05 LIKE SOLISTI1-LINE.
    PARAMETERS: L06 LIKE SOLISTI1-LINE.
    PARAMETERS: L07 LIKE SOLISTI1-LINE.
    PARAMETERS: L08 LIKE SOLISTI1-LINE.
    PARAMETERS: L09 LIKE SOLISTI1-LINE.
    PARAMETERS: L10 LIKE SOLISTI1-LINE.
    Macro
    DEFINE M_LINEADD.
    IF NOT &1 IS INITIAL.
      TAB = &1. APPEND TAB.
    ENDIF.
    END-OF-DEFINITION.
    Variables
    DATA: BEGIN OF TAB OCCURS 10.
    DATA:   LINE(40).
    DATA: END OF TAB.
    DATA: RC LIKE SY-SUBRC.
    Main program
    START-OF-SELECTION.
      REFRESH TAB.
      M_LINEADD L01.
      M_LINEADD L02.
      M_LINEADD L03.
      M_LINEADD L04.
      M_LINEADD L05.
      M_LINEADD L06.
      M_LINEADD L07.
      M_LINEADD L08.
      M_LINEADD L09.
      M_LINEADD L10.
      PERFORM Z_SEND_EMAIL TABLES TAB USING EAD SUB RC.
      IF RC IS INITIAL.
        WRITE: / 'Your e-mail has been sent successfully.'.
      ELSE.
        WRITE: / 'Your attempt to send an e-mail failed.'.
      ENDIF.
          FORM Z_SEND_EMAIL                                             *
    -->  ITAB                                                          *
    -->  EMAILADDRESS                                                  *
    -->  SUBJECTLINE                                                   *
    -->  RETURNCODE                                                    *
    FORM Z_SEND_EMAIL TABLES ITAB
                      USING  EMAILADDRESS TYPE C
                             SUBJECTLINE  TYPE C
                             RETURNCODE   LIKE SY-SUBRC.
      DATA: DOCUMENT LIKE SODOCCHGI1.
      DATA: PACKLIST LIKE SOPCKLSTI1     OCCURS 0 WITH HEADER LINE.
      DATA: CONTENTS LIKE SOLISTI1       OCCURS 0 WITH HEADER LINE.
      DATA: RECVLIST LIKE SOMLRECI1      OCCURS 0 WITH HEADER LINE.
      DATA: FIELDLEN TYPE P.
      DATA: TABLINES TYPE P.
    Initialization
      CLEAR: CONTENTS, DOCUMENT, PACKLIST, RECVLIST.
      REFRESH: CONTENTS, PACKLIST, RECVLIST.
      RETURNCODE = 12.
    Contents
      CONCATENATE
        'The following message has been sent from SAP'
        SY-SYSID
        SY-MANDT
        '(Do not reply to this message):'
          INTO CONTENTS SEPARATED BY ' '.
      APPEND CONTENTS.
      CONTENTS = SY-ULINE(40).
      APPEND CONTENTS.
      LOOP AT ITAB.
        CONTENTS = ITAB.
        APPEND CONTENTS.
      ENDLOOP.
      CONTENTS = SY-ULINE(40).
      APPEND CONTENTS.
    Document
      DOCUMENT-OBJ_NAME = 'EMAIL'.
      DOCUMENT-OBJ_DESCR = SUBJECTLINE.
      DOCUMENT-OBJ_LANGU = SY-LANGU.
      DOCUMENT-OBJ_EXPDAT = SY-DATUM.
      DOCUMENT-SENSITIVTY = 'F'.
      DOCUMENT-OBJ_PRIO = 9.
      DOCUMENT-NO_CHANGE = 'X'.
      DOCUMENT-PRIORITY = 9.
      DOCUMENT-EXPIRY_DAT = SY-DATUM.
      DESCRIBE FIELD CONTENTS-LINE LENGTH FIELDLEN.
      DESCRIBE TABLE CONTENTS LINES TABLINES.
      MULTIPLY FIELDLEN BY TABLINES.
      DOCUMENT-DOC_SIZE = FIELDLEN.
    Packing list
      PACKLIST-TRANSF_BIN = SPACE.
      PACKLIST-HEAD_START = 1.
      PACKLIST-HEAD_NUM = 0.
      PACKLIST-BODY_START = 1.
      DESCRIBE TABLE CONTENTS LINES PACKLIST-BODY_NUM.
      PACKLIST-DOC_TYPE = 'RAW'.
      APPEND PACKLIST.
    Receiver list
      RECVLIST-RECEIVER = EMAILADDRESS.
      RECVLIST-REC_TYPE = 'U'.
      RECVLIST-COM_TYPE = 'INT'.
      RECVLIST-NOTIF_DEL = 'X'.
      RECVLIST-NOTIF_NDEL = 'X'.
      APPEND RECVLIST.
    Call the mail function
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = DOCUMENT
                PUT_IN_OUTBOX              = 'X'
           TABLES
                PACKING_LIST               = PACKLIST
                CONTENTS_TXT               = CONTENTS
                RECEIVERS                  = RECVLIST
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                DOCUMENT_TYPE_NOT_EXIST    = 3
                OPERATION_NO_AUTHORIZATION = 4
                PARAMETER_ERROR            = 5
                X_ERROR                    = 6
                ENQUEUE_ERROR              = 7
                OTHERS                     = 8.
      RETURNCODE = SY-SUBRC.
    ENDFORM.

  • Javamail html send partial message

    hi,
    I have problem with javamail when I want send a html message, the received message is incomplete(I have more than 1000 characters). And this is not the end of the message that missed.
    Can you help me?
    Here is my code:
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setContent(msgText, "text/html");
    mp.addBodyPart(mbp1);
    msg.setContent(mp);
    Transport.send(msg);

    Have you looked at the Javamail FAQ? Have you looked at the sendhtml email example?

  • Client sends entire message, Server only sends first line...

    I can send a three lined message to the server, but I can only send one line back and as far as I'm aware I'm using the same stuff either side so it should be fine? Maybe someone here can I point out where I'm going wrong...
    Client
    package Assignment;
    // EchoClient.java
    // This attempts to connect to the echo port of a server.
    // e.g. java EchoClient [IPaddr]
    import java.io.*;
    import java.net.*;
    public class EchoClient {
        public void EchoClient() {
        }     // constructor
        public static void main(String[] args) throws IOException {
            HTCPCPProtocol htcpcp = new HTCPCPProtocol();
            Socket echoSocket = null;
            PrintWriter out = null;
            BufferedReader in = null;
            String host = "localhost";
    //String host = "127.0.0.1"; //modify read in
            int portNo; // modify read in
            if (args.length != 0) {
                host = args[ 0];
            BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
            String userInput;
            do {
                System.out.print("Enter some text to echo (END = exit): ");
                System.out.flush();
                userInput = stdIn.readLine();
                try {
                    echoSocket = new Socket(host, 3456); // modify so portNo is cmd line!
                    out = new PrintWriter(echoSocket.getOutputStream(), true);
                    in = new BufferedReader(new InputStreamReader(echoSocket.getInputStream()));
                catch (UnknownHostException e) { // hostname cannot be resolved to ipaddr!
                    System.err.println("Don't know host named: " + host);
                    System.exit(1);
                } catch (IOException e) { // ipaddr doesn't locate a host
                    System.err.println("Couldn't get I/O for " + "the connection to: " + host);
                    System.exit(1);
                //String message = htcpcp.constructRequestMessage(userInput);
                String message = "\r\n"+"BREW "+" "+ "\r\n"
                    +"Accept Additions:#"+"\r\n"+
                    "Coffee Pot/message=start";
                out.println(message);
                out.flush();
                System.out.println(in.readLine()); // should print entire message
            } while (!userInput.equals("END"));
            out.close();
            in.close();
            stdIn.close();
            echoSocket.close();
        } // main
    } // class EchoClientServer
    package Assignment;
    //  EchoServer.java
    //  Acts as an echo server.
    //  Client must connect on the correct port.
    //  Server closes the connection on receiving 'END'.
    //  But keeps running for more client connections.
    //  Give the port number as a command line argument:
    //    e.g. java EchoServer [4567]
    import java.io.*;
    import java.net.*;
    public class EchoServer {
        public final static int DEFAULT_PORT = 3456;
        public final static int qLen = 3;   // number of clients that can q
        public void EchoServer() {
        public static void main(String[] args) throws IOException {
            HTCPCPProtocol htcpcp = new HTCPCPProtocol();
            ServerSocket listenSocket = null;
    //    OutputStreamWriter osw = null;
            PrintWriter osw = null;
            InputStreamReader isr = null;
            BufferedReader br = null;
            int portNum = DEFAULT_PORT;
            int clientNo = 0;                 // count clients serviced
            if (args.length != 0) {
                try {
                    portNum = Integer.parseInt(args[ 0]);
                    // put some test here to allow for port number not in range
                } catch (NumberFormatException nfE) {
                    System.err.println("Illegal port number: " + args[ 0]);
                    System.err.println("\tUsing the default: " + DEFAULT_PORT);
            try {
                listenSocket = new ServerSocket(portNum, qLen);
            } catch (BindException e) {
                System.err.println("Could not bind to port: " + portNum);
                System.err.println("\tIs it already in use?");
                System.err.println("\tIs it a reserved port number?");
                System.exit(1);
            while (true) {                // loop forever accepting clients
                Socket clientSocket = null;
                // try changing for isr rather than br
                String request = null;
                try {
                    clientSocket = listenSocket.accept();     // actual comms socket!
                    ++clientNo;                               // count clients serviced
                    //osw = new OutputStreamWriter( clientSocket.getOutputStream());
                    osw = new PrintWriter(clientSocket.getOutputStream(), true);
                    //     out = new PrintWriter(echoSocket.getOutputStream(), true);
                    System.out.println("Connection from: " + clientSocket.getInetAddress());
                    br = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
                    do {
                        request = br.readLine();
                        System.out.println(request);
                        String responseMessage = "HTCPCP/0.1"+"\r\n"
                    +"safe:yes"+"\r\n"
                    +"Accept Addition:#"+"\r\n"
                    +"Coffee Pot/message=start"+"\r\n";
                        //osw.write( "Hello from "+ InetAddress.getLocalHost() + " to Client no:" + clientNo + "\r\n");
                        String response = htcpcp.OKResponseMessage();
                        osw.write(responseMessage);
                        osw.flush();
                    } while (!request.equals("END"));
                    System.out.println("Client " + clientNo + " closed connection");
                    osw.close();
                    isr.close();
                    br.close();
                    clientSocket.close();
                } // end try{} accepting a client connection
                catch (IOException ioE) {
                    System.err.println("Connection error, maybe the client died!");
                } finally {                           // to trap any other errors!!
                    try {
                        if (clientSocket != null) {
                            clientSocket.close();
                    } catch (IOException ioE) {
                } // end of finally
            } // while forever waiting for a client connection
        } // main
    } // class EchoServer

    aaron101 wrote:
    Hmm, tried it again and it printed the 'safe:yes' line and the 'coffeepot' line... repeated that sequence 4 times.
    I tried changing the while loop too...
    while (in.readLine != null | in.readLine == null) {
    System.out.println(in.readLine()); // should print entire message
    }The output was...
    Accept..
    safe...
    HTCPCP...
    Coffee...
    Accept...
    Am I far from the solution to this problem? Cos I've been stuck on this for two days straight now. Seems so trivial!That shouldn't compile. Assuming you meant in.readLine() everywhere you wrote in.readLine, now you're reading 3 lines every time thru the loop and only printing every 3rd one.
    So no, you're not getting any closer.
    A typical pattern:
    while (true)
      String line = in.readLine();
      if (line == null)
        break; // get out of the loop; no more input
      System.out.println(line);
    }

  • I have not downloaded my free pages  yet but would like to send a messages via email know from the notes application but do not know how

    l have not down oaded pages it is being processed however I would like to type up a messages on notes and sent it via e-lmail  can I and how?

    Bottom right corner.

  • How to set Email Body in srw.add_parameter(myPlist,'MESSAGE'....

    Hi, i have created following procedure to send email using event driven Publishing API,
    it works fine, i have using "message" and "body" in add_parameter ,but it send email with no body/message,blank email body.
    Please help out how to set email body....
    im using
    - AS 10g(10.1.2)
    - Windows Server 2003
    --procedure
    CREATE OR REPLACE PROCEDURE testemail
    is
    myPlist SRW_PARAMLIST;
    myIdent SRW.Job_Ident;
    myStatus SRW.Status_Record;
    BEGIN
    --srw.start_debugging;
    myPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));
    srw.add_parameter(myPlist,'GATEWAY','http://myserver:7778/reports/rwservlet');
    srw.add_parameter(myPlist,'SERVER','myrepserver');
    srw.add_parameter(myPlist,'REPORT','D:\Reports\abc.rdf');
    srw.add_parameter(myPlist,'USERID','abc/xyz@mydb');
    srw.add_parameter(myPlist,'DESTYPE','mail');
    srw.add_parameter(myPlist,'DESFORMAT','PDF');
    srw.add_parameter(myPlist,'DESNAME','[email protected]');
    srw.add_parameter(myPlist,'SUBJECT','Test Mail');
    srw.add_parameter(myPlist,'MESSAGE','This is test email');
    srw.add_parameter(myPlist,'FROM','[email protected]');
    myIdent := srw.run_report(myPlist);
    myStatus := srw.report_status(myIdent);
    --srw.stop_debugging;
    end;
    /

    1. Current work flow :-In web site the user have to register themselves in the web site and enters his details along with user id, password and email id. Once user
    is registered then he will login with his user id and password. The user id is picked from login control and that set in “SPWeb.CurrentUser” as user id and system uses "Membership.ValidateUser" method to Authenticate user for login. 
    2. New Requirement: we would like to facilitate the user to login with Email id as well as user id. 
    Problem: 
    We replaced "Membership.ValidateUser" method to our own method to Authenticate user with email id/user id and password. 
    When user is login with user id and password it is working successfully but in the case of email id and password –“the email id is picked from user control and set as
    "HttpContext.Current.User.Identity.Name" but we are not getting “SPWeb.CurrentUser” and it shows null value.” 
    We are able to get user id from database using email id of user. Please help us how we can set user id in "SPContext.Current.Web.CurrentUser".
    Mohan Prakash

Maybe you are looking for

  • Populating the long text in equipment

    How do we propose to populate the long txt in equipment?  Is LSMW viable option, or would this be more complicated than it sounds?

  • VL02N Output type issue.

    Hi, When I execute the tcode VL02N for any output type (ZEU5) for print preview and external mail then it is giving error that "Output could not be issued". I have also checked the config of NACE , it seems to be ok. So what are the other possibiliti

  • Problems with java regular expressions

    Hi everybody, Could someone please help me sort out an issue with Java regular expressions? I have been using regular expressions in Python for years and I cannot figure out how to do what I am trying to do in Java. For example, I have this code in j

  • Upgraded to new iTunes....now will not launch

    Hello all. this AM I upgraded to the new version of iTunes. Big mistake. Now the silly thing won't even open...no error message, no nothing--just an hourglass and then nada. So, I read around on the boards and tried the Quicktime install as a standal

  • SO quantity  convert problem  -_-

    code : Tables s906. data : int1 type i. select single * from s906 into s906 where bstnk = 'SY05'. if sy-subrc = 0.   int1 = s906-aemenge .   (s906-aemeng = 12.000)   BREAK-POINT. endif. The table 'S906' is a  info structure of  SO . It collect the qu