Break string in email

  String mydoc = (String) session.getAttribute("ReceiveDoc");
String body = "<p>This email serves to acknowledge the receipt of your fee deferment application set with the following supporting documents on</p>"
                + mydoc + "<br>";.......... mbp.setContent(header + body + footer, "text/html");How can I put a loop to break mydoc and display it in email, I mean I know the StringTokenizer tokens =new StringTokenizer(s,","); not problem to break the string with the , in jsp or servlet (actually, I add the , on the time I create the string) but I want to display it in email,
I want my body part in email like
String body = "<p>This email serves to acknowledge the receipt of your fee deferment application set with the following supporting documents on</p>"
hello1,
hello2,
depend on how many common on the string
Thank you

I assume that mydoc has a list of items separated by commas. In this case, you can display the line break in HTML content email with the <br> tag. Try using the following code:
String mydoc = (String) session.getAttribute("ReceiveDoc");
String body = "<p>This email serves to acknowledge the receipt of your fee deferment application set with the following supporting documents on</p>"
                + mydoc.replaceAll(",","<br>") + "<br>";.......... mbp.setContent(header + body + footer, "text/html");{code}
Edited by: J4Java on Apr 29, 2009 2:39 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Mac Mail signatures work but appears at the bottom of a string of emails not after the email just composed. Is there a fix?

    Signatures in email work - however they appear at the bottom of the page after all of the email that appear on the page. How can I get the signatures to appear after the email msg that I just composed?

    Carolyn: Thank you for the reply, however neither deselecting nor selecting that option has any effect on the location of the signature. In both cases it will appear at the end of the string of emails.
    This is a time consuming annoyance - it would seem to be an easy thing to program that the signature lands wherever at the location of the cursor???

  • Someone is breaking into my email account.

    Can anything be done to catch a person who breaks into an email account?
    == This happened ==
    Not sure how often

    Firefox is not an email program, so your problem depends on what site you are using for email. What site are you using?

  • Line break up during email writing

    How can I do line break up during email writing.I couldn't find any enter option.with touch I can do only once.but I need two or three line space.

    There is no word processing type formatting in the mail app. The only formatting in the mail app is for bold, italics and underlined text.
    if you want additional spaces between lines, you just have to keep tapping the return key.

  • How do I break an incorrect email thread on my iPhone?

    My iPhone has incorrectly threaded 3 emails that have no relation to each other (other than no subject in the subject line).  How do I break the thread as they are not related and from different senders?  This is not the case in my email on my MacBook Air from the same senders to the same email account.  They are all separate.  It occurs only on the iPhone.  (iPhone 5 with OS 7.0.4)

    Yes, and this is typical.  They are all messages into the same individual email account as well.  Can the thread be broken by me or will it just continue to add messages that have no subject into the thread?  Why would it do it under All Inboxes when it doesn't do it under the inbox that they are all in in the first place?

  • How to get person picker field to return as email instead of a string when emailing in a workflow?

    Hi, I have 3 person fields in Infopath 2013 form.  In the Form Option, Property Promotion, each of these people picker field, i selected the DisplayName,
    give it a column name and selected the Merge under Function.  
    In the workflow I created for this form.  Depending on selection from a radio button and a dropdown controls, I would email to one or 2 of the people selected
    from the people picker controls mentioned above.  
    In the Email To field, I select "Workflow Lookup for a User", select the field that I promoted (mentioned above), but the "Return field as"
    field is grey out, disabled. It doesn't allow the option to return as an email. I suspect it's because the 3 properties were promoted as concatenated string?  
    Now when my workflow is run, the workflow is immediately canceled.  I suspect it's the problem with the email field.  How can I promote a Person Picker
    field so it will return a email address when I use it in the email to user function in workflow?
    Thank you.

    The control I use is a Person/Group Picker.  I tried in Property Promotion selecting either DisplayName, AccountID or even the PCPerson but none of them would give me the "Return Field As" field enabled to select to return as email.   It stays
    as grey out, disabled, and return as string.  
    I suspect this is also why I'm not getting the email when workflow starts.  Where can I check if an email is sent?  I have it sent to myself, by selecting myself in the Person/Group picker but I haven't received any emails.
    Thank you.

  • TEXT Mail line break issue in Email body

    Email content is breaking up when the preference is MAILTEXT.
    Please see the comments Line Break.
    Ex:
    Dear --Line Break
    PETER,
    Thank you for contacting XXXXX. The service request number 547631 has been created for the following issue:
    Testing Notification
    A technical support representative is working to resolve your issue.
    Because we recognize that many of our customers would prefer to find answers conveniently on our website, we'd like to invite you now and for future needs to search our Knowledge Base online at:
    If --Line Break
    you have any questions or concerns, please contact us at XXXX or XXXX and have your service request number available for the technical support representative.
    Thanks --Line Break
    again, and we appreciate your continued business.
    We are on 11.5.9 and WF version is 2.6.0

    If you have not got a resolution for this issue still, this was a bug in Workflow code and fixed in OWF.H I believe. Please search for Oracle Workflow one-off patches if an one-off was released for 11.5.9.
    Thanks

  • Does anyone know how to break an infinite email loop?

    I appear to have an infinite mail loop (caused by an e-mail being sent with too many pictures attached).  Does anyone know how to break the loop?  Everytime I delete it, more (in fact hundreds) reappear.

    I don't use attachments too much, but there is a way of handling your situation. It might help to know about your email structure. You haven't provided too many details, so I'll do the best with what I have.
    Most users access their emails from two main sources: an ISP or an external provider like Google. If you use an ISP, like ATT, it's relatively easy to deal with your email problem. Log onto your ATT webmail, and you can delete the problematic email at its source. Delete the messages one by one, or delete blocks of emails by highlighting them and deleting. In the future, stay up to date with your emails to make sure this doesn't happen again.
    Some users use an external provider like Google, but the solution is the same. Delete messages one by one, or in blocks, until they're all gone.
    There's a trick to help you delete emails more easily: The next time you use Mail, make sure it's offline. You won't be able to download additiional email, but you'll be able to process the mail you already have on your computer. You can't get an "infinite loop" if you stop the flood of emails beforehand.
    Does that sound right? Post with your results!

  • Converting query to SP; ListQualify is breaking string for SQL

    Hello, all.
    I'm attempting to convert a number of queries into SPs; for the most part, it's going smoothly.
    However, there is one query (quite large) that I am having problems converting to SP because the query is using ListQualify to insert apostrophes around each list element, and it's breaking the string being sent.
    How can I keep the apostrophes without breaking the SQL string?
    Thanks,
    ^_^

    Just escape the apostrophe with another apostrophe?  OR, do you mean surround the apostrophe with quotes? (" ' ")
    Thanks,
    ^_^

  • Break string in column

    Hello to all ,
    Having a strings like this, where pipe(|) is his delimiter
    10:00 | x1 | 2 | RO | P | Con ausilio  | y1
    10:10 | x2 | 1 | RO |  |  | y2
    10:20 |x3 | 3 |  |  |  | y3
    10:30 |x4 | 3 | RO | N | Con aiuto  | y4
    10:40 |x5 | 1 | RO |  |  | y5
    how can I break it up into columns, for example, the first char(before first pipe) insert in first variable,
    then, after first pipe,  second characters in a other column ans so on
    col1 := '10:00';
    col2 := 'x1';
    col3 := '2';
    col4:= 'RO';
    col5 := 'P';
    col6 := ' Con ausilio ';
    col7 := 'y1';
    col1 := '10:10';
    col2 := 'x2';
    .. and so onthanks in advance

    Is this somehow related to oracle forms? For what we know you don't even use an oracle product like forms or the database, so an answer would be near to impossible.
    First of all please indicate the oracle products plus their 5-digit version numbers you are using. After that please share with us what you plan to do with this string tokenizer, where you get the string from (maybe a CSV file?) and what you plan to do with it (maybe insert into a table?)
    cheers

  • Acrobat 9.4.2 update breaks 'attach to email' functionality

    Everyone - The recent 9.4.2 CPSID_83708 Acrobat update has caused the 'attach to email' function not to work.  This is happening for at least two of my users whose computers are running  Windows XP Professional. I just installed the update on my Windows Vista machine in an effort to recreate the issue, but the problem did not manifest itself in my Vista machine.
    I have read with interest the print problems that several users are reporting related to this patch. I have had no problems printing, but the 'attach to email' issue is extremely troubling to us.  I realize that the work-around is to send the attachments directly from our email program which we are doing.  However, this does not decrease the urgency to get this resolved.  Some of our users are extremely accustomed to accomplishing tasks in a certain manner, and much stress results when I try to change their habits.
    When they click 'attach to email', an error message comes up that says 'Adobe Acrobat 9.4.2 has encountered a problem and needs to close.'  I am attaching the detailed information that I could view from the error window below.  Please advise on how I can uninstall this 'uninstallable' patch.  I have currently advised users to opt out of any Adobe updates, but I am sure that people will continue to receive them.
    Thanks in advance for any help with this.
    Penny Downey

    Could someone from Adobe respond to this specific issue so that we know we are being heard?  Will the fix for the print issue also resolve the 'attach to email' problem?  Is there any work around other than telling users to attach directly from their email programs?
    Thanks in advance for your response to our concerns.
    Penny

  • How can I get NUMBERS to insert a page break when I email a long file from the iPad?

    A Long Numbers file can not get emailed properly (in a readable format) when it is emailed from the iPad using ios8. The entire file gets squeezed into oa ne page PDF when emailed. I don't want to go home and email the work from a desktop computer. I want to email from the ipad at the end of t he workday.  Help!!!

    The CSV and excel distort the file and the Numbers format is not an option because my clients don't use a MAC.

  • Break string using unique query

    Hi
    I have data as
    SQL> select  T1.USUARIO, T1.departamento, t1.acao
      2    from SIBTB_PERMISSAO  t1
      3    where t1.acao in ('SIBPED','SIBCOM','SIBPED','SIBFIN')
      4    and t1.usuario = 'umlanton'
    SQL> /
    USUARIO              DEPARTAMENTO                                                                     ACAO
    umlanton             '25','26','27','28','29','66','67','68','69'                                     SIBFIN
    umlanton             '25','26','27','28','29','66','67','68','69'                                     SIBPED
    umlanton             '25','26','27','28','29','66','67','68','69'                                     SIBCOMI musto to break data in unique queyr show data as:
    umlanton          25     SIBFIN
    umlanton          26     SIBFIN               
    umlanton          27     SIBFIN
    umlanton          28     SIBFIN
    umlanton           29     SIBFIN
    umlanton           66     SIBFIN
    umlanton           67     SIBFIN
    umlanton           68     SIBFIN
    umlanton           69     SIBFIN
    umlanton          25     SIBPED
    umlanton          26     SIBPED               
    umlanton          27     SIBPED
    umlanton          28     SIBPED
    umlanton           29     SIBPED
    umlanton           66     SIBPED
    umlanton           67     SIBPED
    umlanton           68     SIBPED
    umlanton           69     SIBPED
    umlanton          25     SIBCOM
    umlanton          26     SIBCOM               
    umlanton          27     SIBCOM
    umlanton          28     SIBCOM
    umlanton           29     SIBCOM
    umlanton           66     SIBCOM
    umlanton           67     SIBCOM
    umlanton           68     SIBCOM
    umlanton           69     SIBCOMI do not have idea how like to begin :-(
    I see something using regular expression, but is with oracle 10.2 , I am using 9.2.02
    using oracle 9.2.02
    TIA

    using oracle 9.2.02
    SQL> with t as
    select 'umlanton' a, '''25'',''26'',''27'',''28'',''29'',''66'',''67'',''68'',''69''' b, 'SIBFIN' c from dual union all
    select 'umlanton' a, '''25'',''26'',''27'',''28'',''29'',''66'',''67'',''68'',''69''' b, 'SIBPED' c from dual union all
    select 'umlanton' a, '''25'',''26'',''27'',''28'',''29'',''66'',''67'',''68'',''69''' b, 'SIBCOM' c from dual
    select a,
           extractvalue(column_value, 'e') b,
           c
      from t,
      table(xmlsequence(xmltype('<e><e>' || trim('''' from replace(b, ''',''', '</e><e>')) || '</e></e>').extract('e/e'))) x
    A        B     C    
    umlanton 25    SIBFIN
    umlanton 26    SIBFIN
    umlanton 27    SIBFIN
    umlanton 28    SIBFIN
    umlanton 29    SIBFIN
    umlanton 66    SIBFIN
    umlanton 67    SIBFIN
    umlanton 68    SIBFIN
    umlanton 69    SIBFIN
    umlanton 25    SIBPED
    umlanton 26    SIBPED
    umlanton 27    SIBPED
    umlanton 28    SIBPED
    umlanton 29    SIBPED
    umlanton 66    SIBPED
    umlanton 67    SIBPED
    umlanton 68    SIBPED
    umlanton 69    SIBPED
    umlanton 25    SIBCOM
    umlanton 26    SIBCOM
    umlanton 27    SIBCOM
    umlanton 28    SIBCOM
    umlanton 29    SIBCOM
    umlanton 66    SIBCOM
    umlanton 67    SIBCOM
    umlanton 68    SIBCOM
    umlanton 69    SIBCOM
    27 rows selected.

  • Formating string inside email body

    Hi All
    How can I format the text that it will be placed in lines at the same level regardless of their length
    I have several lines with several length ,that will be sent per mail.
    for example
    cost per shirt                    100
    cost per trousers               200
    Total                    300
    I have tried with several string functions but the without luck.
    Thanks.
    Edited by: Malu Mader on Dec 6, 2011 10:14 AM

    Hi Soumyaprakash
    This could be the solution , but when I am sending the mail I have already my text in a string table
    I am looping into it and appending the string I have in the table into the mail body
    so I did in this way but the whole string is comming out including the <td> and so on
    lt_mailtxt = '<table border="0">' .
    APPEND lt_mailtxt.
    CLEAR lt_mailtxt.
    LOOP AT it_string.
      lt_mailtxt = '<tr>'.
      APPEND lt_mailtxt.
      clear lt_mailtxt .
    lt_mailtxt = '<td>' .
      APPEND lt_mailtxt.
       CLEAR lt_mailtxt.
        lt_mailtxt = it_string.
        APPEND lt_mailtxt.
        CLEAR lt_mailtxt.
    lt_mailtxt = '</td>' .
      APPEND lt_mailtxt.
    lt_mailtxt = '</tr>' .
      APPEND lt_mailtxt.
      ENDLOOP.
    lt_mailtxt = '</table>' .
    APPEND lt_mailtxt.
    CLEAR lt_mailtxt.
    What  am I missing... ?
    BR

  • Patch 111685 breaks string concatenation!!!

    Patch 111685 for WS6U2 fixes a lot of problems but introduces a massive memory leak in operator+= for std::string. Sun has already acknowledged that it's a serious bug (bug id 4520126) although they are taking forever to fix it:
    This is the test case that we submitted to Sun:
    $ uname -a
    SunOS mildev1 5.8 Generic_108528-09 sun4u sparc SUNW,Ultra-80
    $ CC -V
    CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-01 2001/08/01
    main.cpp
    #include <string>
    int main()
    const char JUNK[] = "JUNK";
    std::string s;
    for (int i = 0; i < 10000; ++i) s += JUNK;
    return 0;
    $ CC -staticlib=Crun,Cstd -g main.cpp -o main
    $ dbx ./main
    Reading main
    Reading ld.so.1
    Reading libm.so.1
    Reading libw.so.1
    Reading libc.so.1
    Reading libdl.so.1
    Reading libc_psr.so.1
    (/pkgs/sun_workshop62/bin/../WS6U2/bin/sparcv9/dbx) check -leaks
    leaks checking - ON
    (/pkgs/sun_workshop62/bin/../WS6U2/bin/sparcv9/dbx) run
    Running: main
    (process id 17850)
    Reading librtc.so
    RTC: Enabling Error Checking...
    RTC: Running program...
    Checking for memory leaks...
    Actual leaks report (actual leaks: 9986 total size: 200142024 bytes)
    Total Num of Leaked Allocation call stack
    Size Blocks Block
    Address
    ====== ====== ========== =======================================
    200142024 9986 - operator new < std::basic_string<char,std::char_traits<char>,std::allocator<char> >::__getRep
    Possible leaks report (possible leaks: 13 total size: 257934 bytes)
    Total Num of Leaked Allocation call stack
    Size Blocks Block
    Address
    ====== ====== ========== =======================================
    257934 13 - operator new < std::basic_string<char,std::char_traits<char>,std::allocator<char> >::__getRep
    execution completed, exit code is 0

    The original message here was posted almost a month ago. The response by ForteSupport clearly confirms the existence of the problem, and I have written my own tests. Since the time when this problem was acknowledged, Sun has released patches for Forte C++ 6U2, in the same patch line (111685-03 updates 111685-02. 02 introduces the leak) but that patch does not address the problem.
    Memory leaks of any type are not acceptable, but this is a nightmare memory leak: it is in library code and it is triggered by a what is a very common operation (string concatenation) in any sort of web or network services product. These are exactly the type of products that cannot tolerate memory leaks, because they have long uptimes.
    This memory leak was introduced in a patch that fixed, among other things, the fact that exceptions were not being caught so that any program that threw an exception aborted. While I find it difficult to understand how problems like these could pass any sort of regression testing, this is not a perfect world, and things do go wrong. But what I find absolutely incomprehensible is that it could take a month to release a fix for this. What is the delay?

Maybe you are looking for

  • HT2845 how can I get the scroll function to work on my magic mouse?

    I got my magic mouse to work perfectly with my macs but I also have a work computer which is a windows vista lenovo.  All functions work with the mouse on my pc but the scroll function when I'm in excel which is a big deal for me because I am an acco

  • How to run servlets in debugger

    Is it possible to start up or attach a debugger to a java servlet in WebLogic 5.1 that is using JDK 1.2.2? Thanks, Sean

  • NW CE71 Trial Version Installation Error @ step createAccounts

    Hi, I am trying to install the NW CE 7.1 trial version but setup stops with an error very early. Here's the log info: ERROR      2007-12-17 11:27:18.341 [sixxcstepexecute.cpp:940] FCO-00011  The step createAccounts with step key |CE_DevSystem_App|ind

  • IE crashes when a Drop Down is selected in a Adobe PDF form

    Hi,    We are using Adobe forms in a Web Dyn pro application, we are facing a strange problem: when we open a PDF and try to select a Drop Down [say DD1], IE is CRASHNG DOWN [Browser gets closed]. This happens only when we try to select a value from

  • Auto billing

    I'm getting billed on my credit card every year for a subscription to a magazine I don't even have on my iPad any longer. It was an auto-billing that I knew notthing about until I view my bank statement. Do I get anything in return for paying for not