/[mailutils]/mailutils/mail/send.c
ViewVC logotype

Diff of /mailutils/mail/send.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33 by gray, Sun Aug 17 15:58:01 2003 UTC revision 1.34 by gray, Mon Aug 18 11:07:35 2003 UTC
# Line 25  Line 25 
25  static int isfilename __P ((const char *));  static int isfilename __P ((const char *));
26  static void msg_to_pipe __P ((const char *cmd, message_t msg));  static void msg_to_pipe __P ((const char *cmd, message_t msg));
27    
28    static void
29    read_cc_bcc (compose_env_t *env)
30    {
31      if (util_getenv (NULL, "askcc", Mail_env_boolean, 0) == 0)
32        compose_header_set (env, MU_HEADER_CC,
33                            ml_readline ("Cc: "), COMPOSE_REPLACE);
34      if (util_getenv (NULL, "askbcc", Mail_env_boolean, 0) == 0)
35        compose_header_set (env, MU_HEADER_BCC,
36                            ml_readline ("Bcc: "), COMPOSE_REPLACE);
37    }
38    
39  /*  /*
40   * m[ail] address...   * m[ail] address...
41   if address is starting with   if address is starting with
# Line 75  mail_send (int argc, char **argv) Line 86  mail_send (int argc, char **argv)
86          }          }
87      }      }
88    
89    if (util_getenv (NULL, "askcc", Mail_env_boolean, 0) == 0)    if (util_getenv (NULL, "mailx", Mail_env_boolean, 0))
90      compose_header_set (&env, MU_HEADER_CC,      read_cc_bcc (&env);
                         ml_readline ("Cc: "), COMPOSE_REPLACE);  
   if (util_getenv (NULL, "askbcc", Mail_env_boolean, 0) == 0)  
     compose_header_set (&env, MU_HEADER_BCC,  
                         ml_readline ("Bcc: "), COMPOSE_REPLACE);  
91    
92    if (util_getenv (NULL, "asksub", Mail_env_boolean, 0) == 0)    if (util_getenv (NULL, "asksub", Mail_env_boolean, 0) == 0)
93      compose_header_set (&env, MU_HEADER_SUBJECT,      compose_header_set (&env, MU_HEADER_SUBJECT,
# Line 327  mail_send0 (compose_env_t * env, int sav Line 334  mail_send0 (compose_env_t * env, int sav
334    
335    fclose (env->file);           /* FIXME: freopen would be better */    fclose (env->file);           /* FIXME: freopen would be better */
336    
337      /* In mailx compatibility mode, ask for Cc and Bcc after editing
338         the body of the message */
339      if (util_getenv (NULL, "mailx", Mail_env_boolean, 0) == 0)
340        read_cc_bcc (env);
341    
342    /* Prepare the header */    /* Prepare the header */
343    header_set_value (env->header, "X-Mailer", argp_program_version, 1);    header_set_value (env->header, "X-Mailer", argp_program_version, 1);
344    

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26