diff -rc lynx2-8-4/lynx.cfg lynx2-8-4.mail/lynx.cfg *** lynx2-8-4/lynx.cfg Sat Jul 14 19:06:16 2001 --- lynx2-8-4.mail/lynx.cfg Tue Apr 2 00:55:00 2002 *************** *** 1060,1065 **** --- 1060,1085 ---- # #CHECKMAIL:FALSE + .h2 EXTERNAL_MAIL + # This variable determines if Lynx will use an external mail program + # to send messages when a link of the form mailto:address@hidden + # is activated. Default is set to FALSE, which means that Lynx will use + # its internal mail program to send e-mail. + #EXTERNAL_MAIL:FALSE + + .h2 EXTERNAL_MAIL_PROGRAM + # This variable defines the command used to start an external mail program + # from Lynx. This definition is only valid if EXTERNAL_MAIL is set to TRUE. + # The general form of this command is as follows: + # + # mailer %s %s %s + # + # The first %s indicates the subject of the message, the second %s the + # recipient of the message and the third %s represents and input file + # passed by lynx to the mailer (normally containing the contents of the + # web page as seen by the user). Below is an example of how to configure + # this option when used with Pine. + #EXTERNAL_MAIL_PROGRAM:pine -customized-hdrs="Subject: %s" %s < %s .h1 News-groups diff -rc lynx2-8-4/userdefs.h lynx2-8-4.mail/userdefs.h *** lynx2-8-4/userdefs.h Sun Jun 3 12:58:00 2001 --- lynx2-8-4.mail/userdefs.h Mon Apr 1 23:51:46 2002 *************** *** 1683,1686 **** --- 1683,1704 ---- * This ends the section specific to anonymous accounts. */ + /***************************** + * This variable determines if Lynx will use an external mail program + * to send messages when a link of the form mailto:address@hidden + * is activated. Default: FALSE, if you want to activate it, set it to + * TRUE. + */ + #define EXTERNAL_MAIL FALSE + + /***************************** + * The purpose of this definition is to give an example of how to configure + * the external mail program. You must set a command that have the form + * mailer %s %s %s + * the first %s represents the subject of the message, the second %s + * represent the recipient of your message, and the third %s must be the + * input file from Lynx. In the case of Pine define as below. + */ + #define EXTERNAL_MAIL_PROGRAM "pine -customized-hdrs=\"Subject: %s\" %s < %s" + #endif /* USERDEFS_H */ diff -rc lynx2-8-4/src/LYGlobalDefs.h lynx2-8-4.mail/src/LYGlobalDefs.h *** lynx2-8-4/src/LYGlobalDefs.h Sat Jul 7 18:30:13 2001 --- lynx2-8-4.mail/src/LYGlobalDefs.h Mon Apr 1 23:55:47 2002 *************** *** 412,417 **** --- 412,420 ---- extern char *XLoadImageCommand; /* Default image viewer for X */ + extern BOOLEAN use_external_mail; /* Do we use external mail? */ + extern char *ExternalMailProgram; /* command to use as external mail */ + #ifdef USE_EXTERNALS extern BOOLEAN no_externals; /* don't allow the use of externals */ #endif diff -rc lynx2-8-4/src/LYMail.c lynx2-8-4.mail/src/LYMail.c *** lynx2-8-4/src/LYMail.c Sun Jun 3 12:58:00 2001 --- lynx2-8-4.mail/src/LYMail.c Tue Apr 2 01:15:24 2002 *************** *** 1286,1291 **** --- 1286,1292 ---- /* * Clear the screen and inform the user. */ + if (!use_external_mail){ LYclear(); LYmove(2,0); scrollok(LYwin, TRUE); /* Enable scrolling. */ *************** *** 1377,1382 **** --- 1378,1385 ---- */ LYaddstr(ENTER_SUBJECT_LINE); label = "Subject"; + } /* external_mail + * We need to make a pause to pick up the subject */ if (*default_subject) { StrAllocCopy(the_subject, default_subject); } else if (!EMPTY(filename)) { *************** *** 1384,1389 **** --- 1387,1393 ---- } else { HTSprintf(&the_subject, "mailto:%s", to_address); } + if (!use_external_mail){ /* Now we continue */ if (!header_prompt(label, &the_subject, MAX_SUBJECT)) { goto cancelled; } *************** *** 1430,1437 **** StrAllocCat(header, "\n"); CTRACE((tfp,"**header==\n%s",header)); #endif /* !VMS */ ! if (!no_editor && !EMPTY(editor)) { if (body) { cp1 = body; --- 1434,1442 ---- StrAllocCat(header, "\n"); CTRACE((tfp,"**header==\n%s",header)); #endif /* !VMS */ + } /* external_mail */ ! if ((!no_editor && !EMPTY(editor)) || (use_external_mail)) { if (body) { cp1 = body; *************** *** 1459,1467 **** goto cleanup; /* ! * Spawn the users editor on the mail file */ ! edit_temporary_file(my_tmpfile, "", SPAWNING_EDITOR_FOR_MAIL); } else if (body) { /* --- 1464,1484 ---- goto cleanup; /* ! * Spawn the users editor on the mail file or the external mail program */ ! if (use_external_mail){ ! char command[500] = {'\0'}; ! sprintf(command,ExternalMailProgram, the_subject, to_address, ! my_tmpfile); ! LYclear(); ! stop_curses(); ! LYSystem(command); ! start_curses(); ! LYRemoveTemp(my_tmpfile); ! goto cleanup; ! } ! else ! edit_temporary_file(my_tmpfile, "", SPAWNING_EDITOR_FOR_MAIL); } else if (body) { /* diff -rc lynx2-8-4/src/LYMain.c lynx2-8-4.mail/src/LYMain.c *** lynx2-8-4/src/LYMain.c Sat Jul 7 18:30:13 2001 --- lynx2-8-4.mail/src/LYMain.c Mon Apr 1 23:55:01 2002 *************** *** 193,198 **** --- 193,199 ---- PUBLIC BOOLEAN child_lynx = FALSE; PUBLIC BOOLEAN error_logging = MAIL_SYSTEM_ERROR_LOGGING; PUBLIC BOOLEAN check_mail = CHECKMAIL; + PUBLIC BOOLEAN use_external_mail = EXTERNAL_MAIL; PUBLIC BOOLEAN vi_keys = VI_KEYS_ALWAYS_ON; PUBLIC BOOLEAN emacs_keys = EMACS_KEYS_ALWAYS_ON; PUBLIC int keypad_mode = DEFAULT_KEYPAD_MODE; *************** *** 448,453 **** --- 449,455 ---- PUBLIC BOOLEAN LYShowTransferRate = TRUE; PUBLIC int LYTransferRate = rateEtaKB_maybe; + PUBLIC char *ExternalMailProgram = NULL; /* default external mailer of lynx */ PUBLIC char *XLoadImageCommand = NULL; /* Default image viewer for X */ PUBLIC BOOLEAN LYNoISMAPifUSEMAP = FALSE; /* Omit ISMAP link if MAP present? */ PUBLIC int LYHiddenLinks = HIDDENLINKS_SEPARATE; /* Show hidden links? */ *************** *** 677,682 **** --- 679,685 ---- FREE(URLDomainPrefixes); FREE(URLDomainSuffixes); FREE(XLoadImageCommand); + FREE(ExternalMailProgram); #ifndef VMS FREE(lynx_version_putenv_command); #endif *************** *** 1181,1186 **** --- 1184,1190 ---- StrAllocCopy(URLDomainPrefixes, URL_DOMAIN_PREFIXES); StrAllocCopy(URLDomainSuffixes, URL_DOMAIN_SUFFIXES); StrAllocCopy(XLoadImageCommand, XLOADIMAGE_COMMAND); + StrAllocCopy(ExternalMailProgram, EXTERNAL_MAIL_PROGRAM); #ifndef DISABLE_BIBP StrAllocCopy(BibP_globalserver, BIBP_GLOBAL_SERVER); diff -rc lynx2-8-4/src/LYReadCFG.c lynx2-8-4.mail/src/LYReadCFG.c *** lynx2-8-4/src/LYReadCFG.c Sat Jul 14 19:06:16 2001 --- lynx2-8-4.mail/src/LYReadCFG.c Mon Apr 1 23:56:34 2002 *************** *** 1491,1496 **** --- 1491,1498 ---- PARSE_FUN("viewer", viewer_fun), PARSE_Env("wais_proxy", 0 ), PARSE_STR("xloadimage_command", XLoadImageCommand), + PARSE_SET("external_mail", use_external_mail), + PARSE_STR("external_mail_program",ExternalMailProgram), PARSE_NIL };