Article View: news.software.readers
Article #37679Patch for slrn to enable calling Windows sendmail
From: root
Date: Sun, 21 Dec 1997 00:00
Date: Sun, 21 Dec 1997 00:00
68 lines
2589 bytes
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);
Technical Details
Message-ID:
<349cd0e2.0@news3.ibm.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <349cd0e2.0@news3.ibm.net> Subject: Patch for slrn to enable calling Windows sendmail Date: Sun, 21 Dec 1997 00:00:00 +0000 From: root@tailor.aleim.net (root) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 309036680 Reply-To: vischne@ibm.net-nospam Organization: The Light Newsgroups: news.software.readers