/[pkg-mixmaster]/trunk/Mix/Src/mail.c
ViewVC logotype

Diff of /trunk/Mix/Src/mail.c

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

revision 115 by rabbi, Tue Dec 11 20:56:07 2001 UTC revision 116 by weaselp, Mon Jul 29 23:52:00 2002 UTC
# Line 6  Line 6 
6     details.     details.
7    
8     Socket-based mail transport services     Socket-based mail transport services
9     $Id: mail.c,v 1.3 2001/12/11 20:56:07 rabbi Exp $ */     $Id: mail.c,v 1.4 2002/07/29 23:52:00 weaselp Exp $ */
10    
11    
12  #include "mix3.h"  #include "mix3.h"
# Line 77  end: Line 77  end:
77    
78  int smtpsend(BUFFER *head, BUFFER *message, char *from);  int smtpsend(BUFFER *head, BUFFER *message, char *from);
79    
80    
81    int sendmail_loop(BUFFER *message, char *from, BUFFER *address)
82    {
83      BUFFER *msg;
84      int err;
85    
86      msg = buf_new();
87      buf_appendf(msg, "X-Loop: %s\n", REMAILERADDR);
88      buf_cat(msg, message);
89      err = sendmail(msg, from, address);
90      buf_free(msg);
91    
92      return(err);
93    };
94    
95  int sendmail(BUFFER *message, char *from, BUFFER *address)  int sendmail(BUFFER *message, char *from, BUFFER *address)
96  {  {
97    /* returns: 0: ok  1: problem, try again  -1: failed */    /* returns: 0: ok  1: problem, try again  -1: failed */
# Line 353  int smtp_send(SOCKET relay, BUFFER *head Line 368  int smtp_send(SOCKET relay, BUFFER *head
368          rfc822_addr(content, rcpt);          rfc822_addr(content, rcpt);
369    buf_rewind(head);    buf_rewind(head);
370    
371    while (buf_getheader(message, field, content) == 0) {    while (buf_isheader(message) && buf_getheader(message, field, content) == 0) {
372      if (bufieq(field, "to") || bufieq(field, "cc") || bufieq(field, "bcc")) {      if (bufieq(field, "to") || bufieq(field, "cc") || bufieq(field, "bcc")) {
373  #ifdef BROKEN_MTA  #ifdef BROKEN_MTA
374        if (!bufifind(rcpt, content->data))        if (!bufifind(rcpt, content->data))

Legend:
Removed from v.115  
changed lines
  Added in v.116

  ViewVC Help
Powered by ViewVC 1.1.5