Changeset 1825 for trunk

Show
Ignore:
Timestamp:
05/27/00 10:21:59 (9 years ago)
Author:
graham
Message:

Use \r\n instead of just \n so qmail is happy.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/email/src/forwarder.cpp

    r1712 r1825  
    1717#include "licq_file.h" 
    1818#include "licq_user.h" 
     19#include "licq_constants.h" 
    1920#include "licq_socket.h" 
    20 #include "licq_constants.h" 
     21#include "licq_translate.h" 
    2122 
    2223extern "C" { const char *LP_Version(); } 
     
    345346  } 
    346347  sprintf (szDate, "Date: %s", ctime(&t)); 
     348  int l = strlen(szDate); 
     349  szDate[l - 1] = '\r'; 
     350  szDate[l] = '\n'; 
     351  szDate[l + 1] = '\0'; 
    347352 
    348353  switch (e->SubCommand()) 
     
    410415  } 
    411416 
    412   fprintf(fs, "HELO %s\n", m_szSMTPDomain); 
     417  fprintf(fs, "HELO %s\r\n", m_szSMTPDomain); 
    413418  fgets(fin, 256, fs); 
    414419  code = atoi(fin); 
     
    420425  } 
    421426 
    422   fprintf (fs, "MAIL From: %s\n", m_szSMTPFrom); 
     427  fprintf (fs, "MAIL From: %s\r\n", m_szSMTPFrom); 
    423428  fgets(fin, 256, fs); 
    424429  code = atoi(fin); 
     
    430435  } 
    431436 
    432   fprintf(fs, "RCPT TO: %s\n", m_szSMTPTo); 
     437  fprintf(fs, "RCPT TO: %s\r\n", m_szSMTPTo); 
    433438  fgets(fin, 256, fs); 
    434439  code = atoi(fin); 
     
    440445  } 
    441446 
    442   fprintf(fs, "DATA\n"); 
     447  fprintf(fs, "DATA\r\n"); 
    443448  fgets(fin, 256, fs); 
    444449  code = atoi(fin); 
     
    450455  } 
    451456 
     457  char *szTextRN = gTranslator.NToRN(e->Text()); 
    452458  fprintf(fs, "%s" 
    453               "%s\n" 
    454               "%s\n" 
    455               "%s\n" 
    456               "%s\n" 
    457               "\n" 
    458               "%s\n.\n", 
    459               szDate, szFrom, szTo, szReplyTo, szSubject, e->Text()); 
     459              "%s\r\n" 
     460              "%s\r\n" 
     461              "%s\r\n" 
     462              "%s\r\n" 
     463              "\r\n" 
     464              "%s\r\n.\r\n", 
     465              szDate, szFrom, szTo, szReplyTo, szSubject, szTextRN); 
     466  delete [] szTextRN; 
    460467 
    461468  fgets(fin, 256, fs); 
     
    468475  } 
    469476 
    470   fprintf(fs, "quit\n"); 
     477  fprintf(fs, "quit\r\n"); 
    471478 
    472479  // Close our connection