🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
1 messages
1 total messages Started by root Sun, 21 Dec 1997 00:00
Patch for slrn to enable calling Windows sendmail
#37679
Author: root
Date: Sun, 21 Dec 1997 00:00
68 lines
2589 bytes
This allows slrn to call the Windows version of the sendmail command, which
has the following sort of command line:

Welcome to sendmail/NT, a mailer stub for Windows/NT and Windows/95.
(c) Nigel R. Ellis <nigele@microsoft.com> 1994 - 1995.

This version built on Jun  5 1995 at 14:56:11

Usage: SENDMAIL.EXE [-h localhostname] [-r smtphost] [-m transport]
          [-U MAPIUser] [-P MAPIPasswd]
           -t {ToList} -f From [-s Subject] -F File

   {ToList} is a space, comma or semi-colon delimited list of recipients
   Valid transports are XMAPI (allow edit before send), MAPI and SMTP
   Default transport is SMTP


The fork() command still causes problems in the b18 cygwin gcc release, to
it's better to un-define HAS_POSIX_SIGNALS in config.h.

--- misc.c.orig	Sat Jul 12 16:29:01 1997
+++ misc.c	Sun Dec 21 02:59:27 1997
@@ -690,7 +690,7 @@
 int slrn_mail_file (char *file, int edit, unsigned int editline, 
	har *to, char *subject) /*{{{*/
 {
    char buf [256 + 2 * SLRN_MAX_PATH_LEN];
-#ifdef __os2__
+#if defined(__os2__) || defined(_WIN32)
    char outfile [SLRN_MAX_PATH_LEN];
 #endif
    
@@ -735,7 +735,7 @@
 	if (fp == NULL) return (-1);
 	
 	slrn_mime_scan_file (fp);
-# ifdef __os2__
+# if defined(__os2__) || defined(_WIN32)
 	pp = slrn_open_tmpfile (outfile, "w");
 # else
 	pp = slrn_popen (Slrn_SendMail_Command, "w");
@@ -770,7 +770,11 @@
 	     putc('\n', pp);
 	  }
 	slrn_fclose (fp);
-#ifdef __os2__
+#ifdef _WIN32
+	slrn_fclose (pp);
+	sprintf(buf, "%s -t %s -F %s", Slrn_SendMail_Command, to, outfile);
+	slrn_posix_system (buf, 0);
+#elif defined(__os2__)
 	slrn_fclose (pp);
 	sprintf (buf, "%s %s", Slrn_SendMail_Command, outfile);
 	slrn_posix_system (buf, 0);
@@ -780,7 +784,9 @@
      }
    else
      {
-#ifdef __os2__
+#ifdef _WIN32
+	sprintf(buf, "%s -t %s -F %s", Slrn_SendMail_Command, to, outfile);
+#elif defined(__os2__)
 	sprintf (buf, "%s %s", Slrn_SendMail_Command, file);
 #else
 	sprintf (buf, "%s < %s", Slrn_SendMail_Command, file);

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads