Update of /cvsroot/mahogany/M/src/mail
In directory sc8-pr-cvs1:/tmp/cvs-serv7741/src/mail

Modified Files:
        SendMessageCC.cpp 
Log Message:
Hotfixed CRLF<->LF conversion

Index: SendMessageCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/SendMessageCC.cpp,v
retrieving revision 1.209
retrieving revision 1.210
diff -b -u -2 -r1.209 -r1.210
--- SendMessageCC.cpp   22 Jul 2003 22:01:42 -0000      1.209
+++ SendMessageCC.cpp   13 Sep 2003 14:32:38 -0000      1.210
@@ -1700,9 +1700,14 @@
          case Prot_Sendmail:
          {
-            if ( msgText.empty() )
-            {
-               WriteToString(msgText);
-            }
-            //else: already done for preview above
+            String lfOnly;
+            
+            // We gotta translate CRLF to LF, because string generated
+            // by c-client has network newlines (CRLF) and sendmail pipe
+            // must have Unix newlines (LF). Maybe WriteToString could do
+            // it before, but WriteToFolder (or MailFolderCC method?) would
+            // then have to translate back to CRLF before passing it to
+            // c-client.
+            WriteToString(lfOnly);
+            lfOnly = strutil_enforceLF(lfOnly);
 
             // write to temp file:
@@ -1725,7 +1730,7 @@
                                wxS_IRUSR | wxS_IWUSR) )
                {
-                  size_t written = out.Write(msgText, msgText.Length());
+                  size_t written = out.Write(lfOnly, lfOnly.Length());
                   out.Close();
-                  if ( written == msgText.Length() )
+                  if ( written == lfOnly.Length() )
                   {
                      String command;



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to