I have a program in which I am sending the mail and my mail body is contains the following content..  abcParameters.put(defConstants.REPORT_MESSAGE, "Invalid file sent by tt. Hence ffgghh  was unable                   to process it : " + s+ "\n" +e.getMessage().toString());   Now the issue is that outlook does not accept line breaks but I need line breaks afte the customised message and exception message so please advise how to achieve this
121565
I'm trying to send an email in Java but when I read the body of the email in Outlook, it's gotten rid of all my linebreaks. I'm putting \n at the ends of the lines but is there something special I need to do other than that? The receivers are always going to be using Outlook.   I found a page on microsoft.com that says there's a 'Remove line breaks' "feature" in Outlook so does this mean there's no solution to get around that other than un-checking that setting?  Thanks
690
What is the difference between \par, \newline, \\ and blank lines? When should I use which one?
6767
Is there a character in JavaScript to break up a line of code so that it is read as continuous despite being on a new line?  Something like....   1. alert ( "Please Select file    2. \ to delete" );
23293
I want to create a case which has an attachment, Billing Account, and topics. Given below is the code from my Test Class:  Scenario: Once user submit the case request and ask for approval. The request goes to the Manager for approval, once the request approves, an email goes to Legal team with an Case attachments in an email.  Topic__c tc = new Topic__c(Name ='My New topic'); Attachment att = new Attachment(Name = 'sample.pdf');  Case c = new Case(Origin = 'Phone',                           Subject = 'New Testing',                           Department__c = 'XXXXXXX', Priority = 'Normal',                           Topic__c = tc.Id,                           Risk_Approval__c = true); insert c;   I am getting the below error:     System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, CaseTrigger: execution of BeforeInsert   My Trigger class:  trigger sendEAttachmentsInMail on Case (before insert, before update){  for(Case casevar : Trigger.new){          Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();          mail.setBccSender(false);         mail.setUseSignature(false);         mail.setTargetObjectId(casevar.Id);         mail.setTemplateId('XXXXXXXXX');         mail.saveAsActivity = false;        //Set email file attachments         List&lt;Messaging.Emailfileattachment&gt; fileAttachments = new List&lt;Messaging.Emailfileattachment&gt;();         for (Attachment a : [select Name, Body, BodyLength from Attachment where ParentId = :casevar.Id])         {         // Add to attachment file list         Messaging.Emailfileattachment efa = new Messaging.Emailfileattachment();         efa.setFileName(a.Name);         efa.setBody(a.Body);         fileAttachments.add(efa);         }         mail.setFileAttachments(fileAttachments);       //Send email         Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });          } }
28849
Html Textarea elements only wrap when they reach a space or tab character. This is fine, until the user types a looooooooooooooooooooooong enough word. I'm looking for a way to strictly enforce line breaks (eg.: even if it results in "loooooooooooo \n ooooooooooong").    The best I've found is to add a zero-width unicode space after every letter, but this breaks copy and paste operations. Anyone know of a better way?  Note: I'm referring to the "textarea" element here (i.e.: the one that behaves similarly to a text input) - not just a plain old block of text.
35663
My controller code is as follows -          for(String resStr : responseArray){             if(resStr.indexOf('r_error_str') != -1){                 responseString += resStr.substring(resStr.indexOf('=') + 1);                  responseString += '\n';             }         }   but when i display this 'responseString ' String using 'apex:outputLabel or apex:outputText or as Exception message '\n' is not converting in new line. Whole String is coming in one line.  Can anyone explain why is this happining
41523
For , the answer given on 7 Feb about how to edit the subject line in the new format of Gmail does not work for me.   There is no box on the left with a down arrow to options to reply, forward or edit subject in my version. There is a book on the right offering options to    Reply Reply to all Forward Filter message Print Delete Report spam Report phising Show original Message text garbled Translate message Mark answered    But, no option to edit subject
15521
I'm experiencing a strange problem with Outlook 2019. When viewing a message it only shows the first line. On an HTML message, it stops at the first close paragraph tag. On a plaintext message, it stops at the first newline character. This is true if viewing a message in the reading pane as well as if double-clicking the message to open in its own window. I have the preview pane set to show 3 lines and it does show more of the message so it seems like Outlook can see more of the message than it's rendering in the reading pane. If I use View Source, the underlying data seems fine and the whole message is there. I've tried the following:  Deleting and re-creating the user's mail profile Uninstalling &amp; re-installing Office Creating a new Windows account &amp; connecting Outlook to a different Exchange account than the one that originally exhibited the problem Checked for Windows updates Checked for Office updates  Any ideas what might be causing this? I feel like I've tried everything obvious &amp; I'm striking out on Google.
62138
I have been trying to get PEAR::mail to successfully deliver emails to hotmail users without being flagged as SPAM and ending up in the junk folder, i have no problems with yahoo/gmail only with hotmail.  google suggested that this is a common problem with hotmail and that possible causes can include   incorrect reverse DNS for main IP of the server lack of SenderId/SPF records  being blacklisted   having checked all of the above i can only think of one other reason - incorrectly formatted headers ?  to test this theory i set up outlook to send email via the same address that PEAR::mail uses and sent a quick test - it delivered straight to my inbox  so i compared the headers from the email sent from PEAR::mail against the headers sent by Outlook and there are only a few differences - i have only listed the differences to save space (and peoples eyes)  PEAR::mail headers (not in outlook headers)  X-PHP-Script: www.example.com/register.php for [users ip address]   Outlook headers (not in PEAR::mail headers)  X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ack6CWSQlgV8s6+6SWyifka2NNpB7g== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350   the only other differences that i can see are   the order of the From: and To: headers are reversed  and in the Received: section of the headers   Outlook  Received: from myhomehostname.com ([ip address] helo=simber)  by mywebhostname.com with local (Exim 4.67)   PEAR::mail  Received: from apache by mywebhostname.com with local (Exim 4.67)   could these small differences in the headers be the cause or am i looking in the wrong place ? i knew this might be problematic hence why i chose to use the PEAR::mail class rather than rolling my own but now i really have no idea where to go with this, any help would be greatly appreciated.  Update: as per changelog's suggestion i have tried adding the MS headers to the PEAR::mail class and i have tried replacing PEAR::mail with PHPMailer (with &amp; without the extra headers) - they all end up in the junk folder.  I am starting to believe that it may not be the headers afterall.  Update 2: i should have mentioned that the emails are just a registration confirmation to validate the email address the user signed up with - no mailshots etc so our volume is extremely low.   I have considered warning users who provide a @hotmail/live email address to add us to their address book or check their junk folder - but this just seems unprofessional to me - it may be that i have to resort to this.  As for becoming Sender Score Certified - its very unlikely that i can justify the cost of this when considering the low volume and purpose of these emails.
62308
I do have a longer paper. In one chapter I got several multiline equations, which I wrote using the align environment from amsmath-package. Actually those are quite long computations which should break anywhere for avoiding to much empty space on a page.  I want to use something like \allowdisplaybreaks, which does exactly what I want. The problem is, that I do not want to allow displaybreaks anywhere else in the document, where I have no control about it. I tried to use \allowdisplaybreaks directly before \begin{align}, hoping it would only apply on the next following align-enviroment. But it applies to every align-environment later in the text.  Is there any way to "stop" the command again?  And yes, I could use \displaybreak for single breaks, but I had to use it in many equations and I needed to put it in every single line, since the pagebreak should move, if I add a few more lines anywhere in the chapter.   Thanks for your help, Greyfox
108709
I want a utility that does something like this:  email --subject="xxx" --body=body.txt --to=to_address@hostname.com   (using pre-configured sender information for e.g. gmail). Note that body.txt is plain text and should be the body of the message, not an attachment. If the body is omitted it should pop up an editor and let me type in my message that way.  I could hack together a quick script that does this, but I was wondering if there's an easy way to do this with common unix tools?
11324
Is there a way like wrap the line after at most 60 letters but it should not break inside some commands like listings does?  Example:      \documentclass[a5paper]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{listings}     \usepackage{xcolor}      \lstset{%       language=[LaTeX]TeX,       backgroundcolor=\color{gray!25},       basicstyle=\ttfamily,       breaklines=true,       columns=fullflexible     }      \begin{document}     \begin{lstlisting}     The roadrunner is the fastest running bird \remark{Check this again with a zoologist!}.     \end{lstlisting}     \end{document}   Output:      The roadrunner is the fastest running bird         remark{Check this again with a zoologist!}.   That should not happen! In my eyes this problem is not discussed in .
35860
\documentclass{article} \usepackage{expl3} \ExplSyntaxOn \begin{document} \tl_to_str:n { testing _ things }  \par  \tl_set:Nn \l_tmpa_tl { testing _ things } \tl_to_str:N \l_tmpa_tl \end{document}   gives a strange result (testing ̇things).  How can I get testing_things?  I basically want verbatim content (with line breaking).
78467
Earlier today I got this message:  Oops! Your edit couldn't be submitted because:   Edits must be at least 6 non-space characters; is there something else to improve in this post?   However, the purpose of my edit was to change the formatting for a message to show code.  There may have been other grammatical mistakes that could have been, but in general it is possible that there would not be.  What's the correct protocol to handle a situation like this?
24169
I have created an HTML page with modified from a template I got.... I want to send as a HTML based newsletter in Outlook 2016.  However the guides I see as "insert as text" do not apply to Outlook 2016 as there is no dropdown for inserting files for that in the 2016 version.  I am wondering how I go about being able to send this HTML email?
58455
I have a problem with a lstlisting environment. I want to use it for displaying several very long lines that can not be reformatted. Independently of the option breakatwhitespace=true or false my lines are not broken down so that the end is far outside of the printable area.  How to specify that line breaks are allowed at any character? Or is it possible to specify the characters (besides whitespace) that can be used for a line break?  Alternative: inserting a special (not-printed) character that indicates "break line here" - doe something like this exists?  \begin{lstlisting}[] Test1: 33b7a2f7c4cc93c46dd4ee2ed81aa1eb-9409135542c79d1ed50c9fde07fa600a_cce5a2fe76bfbd0c48d79fb43a7106f0_263e9a8711c1400fb2a716a1b820ac9a Test2: 33b7a2f7c4cc93c46dd2423423423423-9409135542c79d1ed50c9fde07fa600a_cce5a2fe76bfbd0c48d79fb43a7106f0_263e9a8711c1400fb2a716a1b820ac9a \end{lstlisting}   Update:  The  works fine. Additionally I found a different approach which works directly with a lstlisting environment:  \begin{lstlisting}[breakatwhitespace=true, literate={\-}{}{0\discretionary{-}{\\}{}}]   ... \end{lstlisting}   It allows to break the lines also at hyphenations. It has some drawbacks especially that the line breaks are looking different from the others in the environment. But may be for others this code may be helpful...  Found here:
63322
I a chat discussion it was suggested that \hspace*{\fill} (with a space before it to allow for a line break) was sufficient to always get the text following aligned to the right. And indeed, it is aligned to the right.    However, in one case it is inserting an additional line  break where one should not be required as illustrated by the last example here.  I want the text bumped to the next line if and only if (iff ) there is no room:    If I remove the space before the \hspace*{\fill}, there are cases (second and third) where a new line should have been inserted but is not:    Related Question:      I have tried the suggestions at the related question and:   Martin Scharrer's suggestion of using \hbox{}\hfill results in the text being on the left for the last case. Herbert's \When macro exhibits a similar problem for the last case. Thorsten Donig's \signed macro does yield the correct number of lines, but portions of the file name for the middle two cases show up on the second line when they easily fit in the first line.     Notes:  I believe that this is unrelated to the problem, as I was able to reproduce the problem without it.  But, am mentioning it here in case it causes an issue with the proposed solution.  I am using \texttt for the file name. This resulted in an additional complication which I initially thought was the cause of the problem.  So, my actual use case is commented out below and it incorporates a solution from        Code:  \documentclass{article} \usepackage[paperwidth=7.0cm,showframe]{geometry} \usepackage{xcolor} \usepackage{xparse}   \newcommand*{\FillLine}[2]{% \noindent\parbox{\linewidth}{%     \raggedright     File:~#2 % &lt;-- Need space here     %Space before \hspace* allows for a break before it     \hspace*{\fill}\texttt{\small CONFIDENTIAL}%  }% }  %\newcommand*{\EnableHyphenationInTexttt}{\hyphenchar\font=45\relax} % %\newcommand*{\FillLine}[2]{% %    \noindent\parbox{\linewidth}{% %       \raggedright %       File:~\texttt{\EnableHyphenationInTexttt#2} % &lt;-- Need space here %       %Space before \hspace* allows for a break before it %       \hspace*{\fill}\texttt{\small CONFIDENTIAL}%  %    }% %}  \begin{document} \FillLine{Name}{Value}  \bigskip \FillLine{Name}{A-Long-Value}  \bigskip \FillLine{Name}{iiiiiii-iiiii-iiiiiii}  \bigskip \FillLine{Name}{Some-Really-Really-Long-Value} \end{document}