Fwd: Patch for slrn to enable calling Windows sendmail
vischne@ibm.net
vischne@ibm.net
Sun Dec 21 04:57:00 GMT 1997
From: root@tailor.aleim.net (root)
Newsgroups: news.software.readers
Subject: Patch for slrn to enable calling Windows sendmail
Organization: The Light
Reply-To: vischne@ibm.net-nospam
X-Newsreader: slrn (0.9.4.3 UNIX)
NNTP-Posting-Host: 32.100.34.253
Message-ID: <349cd0e2.0@news3.ibm.net>
Date: 21 Dec 97 08:18:42 GMT
Lines: 65
Path: news3.ibm.net!root
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);
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
More information about the Cygwin
mailing list