[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Addition to LYMail.c for using the American blat mailer
From: |
vtailor |
Subject: |
Re: lynx-dev Addition to LYMail.c for using the American blat mailer |
Date: |
Mon, 17 Apr 2000 14:04:01 -0400 |
> * From: Doug Kaufman <address@hidden>
> * Date: Wed, 5 Apr 2000 07:40:04 -0700 (PDT)
>
>On Wed, 5 Apr 2000 address@hidden wrote:
>
>> I'm sure you're right. But, blat is the default mailer for lynx,
>>and it might
>
>I don't know that this is a correct statement. Blat may be configured
>as the default mailer under Win32. It was included when Hiroyuki
>Senshu's patches were integrated, but there has been little discussion
>about what should be "default". The freeware version of Nigel Green's
>sendmail.exe program has been distributed with some of the Win32
>binaries for quite some time.
No, no, no, no, Dougie. Remember, you have to use the -noblat option
to make sendmail.exe work? Don't quibble with me, you know perfectly
well what I mean. At any rate, I believe that my version of call_blat
in LYMail.c works for the Kanji version of blat as well as for the
American version, and I am asking that it be tested by the Japanese
developers and integrated into the code.
In case it got missed, here it is once again:
Enclosed are #ifdefs for LYMain.c and LYMail.c to use the American version of
blat.exe.
It would simplify the LYMail.c code if all the other mailer versions were
turned into calls
on blat_cmd:
In LYMain.c:
#ifdef WIN_EX
#ifndef __MINGW32__
#undef SYSTEM_MAIL
#undef SYSTEM_MAIL_FLAGS
#define SYSTEM_MAIL "BLATJ"
#define SYSTEM_MAIL_FLAGS ""
#endif
PUBLIC BOOLEAN focus_window = FALSE; /* 1998/10/05 (Mon) 17:18:42 */
PUBLIC char windows_drive[4]; /* 1998/01/13 (Tue) 21:13:24 */
#endif
In LYMail.c
#ifdef __MINGW32__
PRIVATE char *blat_cmd(
char *mail_cmd,
char *filename,
char *address,
char *subject,
char *ccaddr,
char *mail_addr)
{
static char *b_cmd;
HTSprintf0(&b_cmd, "%s %s -t %s -s \"%s\" %s %s %s %s %s",
mail_cmd,
filename,
address,
subject,
system_mail_flags,
ccaddr? "-c" : "",
ccaddr? ccaddr : "",
mail_addr? (mail_addr[0]? "-f" : "") : "",
mail_addr? (mail_addr[0]? mail_addr : "") : "");
return b_cmd;
}
PRIVATE void blat_clean(void)
{
}
#else
static char bl_cmd_file[512];
PRIVATE char *blat_cmd(
char *mail_cmd,
char *filename,
char *address,
char *subject,
char *ccaddr,
char *mail_addr)
{
FILE *fp;
static char *b_cmd;
#ifdef __CYGWIN__
char dosname[LY_MAXPATH];
#endif
if ((fp = LYOpenTemp(bl_cmd_file, ".blt", "w")) == NULL) {
HTAlert(FORM_MAILTO_FAILED);
return NULL;
}
#ifdef __CYGWIN__
cygwin_conv_to_full_win32_path(filename, dosname);
fprintf(fp, "%s\n", dosname);
#else
fprintf(fp, "%s\n", filename);
#endif
fprintf(fp, "-t\n%s\n", address);
if (subject)
fprintf(fp, "-s\n%s\n", subject);
if (mail_addr && strlen(mail_addr) > 0) {
fprintf(fp, "-f\n%s\n", mail_addr);
}
if (ccaddr && strlen(ccaddr) > 0) {
fprintf(fp, "-c\n%s\n", ccaddr);
}
fclose(fp);
#ifdef __CYGWIN__
cygwin_conv_to_full_win32_path(bl_cmd_file, dosname);
HTSprintf0(&b_cmd, "%s \"@%s\"", mail_cmd, dosname);
#else
HTSprintf0(&b_cmd, "%s @%s", mail_cmd, bl_cmd_file);
#endif
return b_cmd;
}
PRIVATE void blat_clean(void)
{
if (bl_cmd_file[0]) {
bl_cmd_file[0] = '\0';
}
}
#endif