- Timestamp:
- 05/27/00 10:21:59 (9 years ago)
- Files:
-
- 1 modified
-
trunk/email/src/forwarder.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/email/src/forwarder.cpp
r1712 r1825 17 17 #include "licq_file.h" 18 18 #include "licq_user.h" 19 #include "licq_constants.h" 19 20 #include "licq_socket.h" 20 #include "licq_ constants.h"21 #include "licq_translate.h" 21 22 22 23 extern "C" { const char *LP_Version(); } … … 345 346 } 346 347 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'; 347 352 348 353 switch (e->SubCommand()) … … 410 415 } 411 416 412 fprintf(fs, "HELO %s\ n", m_szSMTPDomain);417 fprintf(fs, "HELO %s\r\n", m_szSMTPDomain); 413 418 fgets(fin, 256, fs); 414 419 code = atoi(fin); … … 420 425 } 421 426 422 fprintf (fs, "MAIL From: %s\ n", m_szSMTPFrom);427 fprintf (fs, "MAIL From: %s\r\n", m_szSMTPFrom); 423 428 fgets(fin, 256, fs); 424 429 code = atoi(fin); … … 430 435 } 431 436 432 fprintf(fs, "RCPT TO: %s\ n", m_szSMTPTo);437 fprintf(fs, "RCPT TO: %s\r\n", m_szSMTPTo); 433 438 fgets(fin, 256, fs); 434 439 code = atoi(fin); … … 440 445 } 441 446 442 fprintf(fs, "DATA\ n");447 fprintf(fs, "DATA\r\n"); 443 448 fgets(fin, 256, fs); 444 449 code = atoi(fin); … … 450 455 } 451 456 457 char *szTextRN = gTranslator.NToRN(e->Text()); 452 458 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; 460 467 461 468 fgets(fin, 256, fs); … … 468 475 } 469 476 470 fprintf(fs, "quit\ n");477 fprintf(fs, "quit\r\n"); 471 478 472 479 // Close our connection
