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

Diff of /mailutils/mail.remote/mail.remote.c

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

revision 1.9 by gray, Wed Jan 22 21:44:15 2003 UTC revision 1.10 by gray, Sun Jan 26 13:48:34 2003 UTC
# Line 72  N_("GNU mail.remote -- pseudo-sendmail i Line 72  N_("GNU mail.remote -- pseudo-sendmail i
72    "the data part of the protocol transaction will also be printed to stdout.\n");    "the data part of the protocol transaction will also be printed to stdout.\n");
73    
74  static struct argp_option options[] = {  static struct argp_option options[] = {
75    {"from",  'f', N_("ADDR"), 0, N_("Override the default from address\n")},    {"from",  'f', N_("ADDR"), 0, N_("Override the default from address")},
76    {"debug", 'd', NULL,   0, N_("Enable debugging output")},    {"debug", 'd', NULL,   0, N_("Enable debugging output")},
77    {      0, 'o', "OPT",  OPTION_HIDDEN, N_("Ignored for sendmail compatibility")},    {      0, 'o', "OPT",  OPTION_HIDDEN, N_("Ignored for sendmail compatibility")},
78    {0}    {0}
# Line 148  main (int argc, char **argv) Line 148  main (int argc, char **argv)
148      {      {
149        if ((status = address_create (&from, optfrom)))        if ((status = address_create (&from, optfrom)))
150          {          {
151            fprintf (stderr, _("Parsing from addresses failed: %s\n"),            mu_error (_("Parsing from addresses failed: %s"),
152                     mu_strerror (status));                      mu_strerror (status));
153            goto end;            goto end;
154          }          }
155      }      }
# Line 160  main (int argc, char **argv) Line 160  main (int argc, char **argv)
160    
161        if ((status = address_createv (&to, (const char **) av, -1)))        if ((status = address_createv (&to, (const char **) av, -1)))
162          {          {
163            fprintf (stderr, _("Parsing to addresses failed: %s\n"),            mu_error (_("Parsing to addresses failed: %s"),
164                     mu_strerror (status));                      mu_strerror (status));
165            goto end;            goto end;
166          }          }
167      }      }
168    
169    if ((status = stdio_stream_create (&in, stdin, MU_STREAM_SEEKABLE)))    if ((status = stdio_stream_create (&in, stdin, MU_STREAM_SEEKABLE)))
170      {      {
171        fprintf (stderr, _("Failed: %s\n"), mu_strerror (status));        mu_error (_("Failed: %s"), mu_strerror (status));
172        goto end;        goto end;
173      }      }
174    
175    if ((status = stream_open (in)))    if ((status = stream_open (in)))
176      {      {
177        fprintf (stderr, _("Opening stdin failed: %s\n"), mu_strerror (status));        mu_error (_("Opening stdin failed: %s"), mu_strerror (status));
178        goto end;        goto end;
179      }      }
180    
181    if ((status = message_create (&msg, NULL)))    if ((status = message_create (&msg, NULL)))
182      {      {
183        fprintf (stderr, _("Failed: %s\n"), mu_strerror (status));        mu_error (_("Failed: %s"), mu_strerror (status));
184        goto end;        goto end;
185      }      }
186    
187    if ((status = message_set_stream (msg, in, NULL)))    if ((status = message_set_stream (msg, in, NULL)))
188      {      {
189        fprintf (stderr, _("Failed: %s\n"),        mu_error (_("Failed: %s"), mu_strerror (status));
                mu_strerror (status));  
190        goto end;        goto end;
191      }      }
192    
# Line 195  main (int argc, char **argv) Line 194  main (int argc, char **argv)
194      {      {
195        const char *url = NULL;        const char *url = NULL;
196        mailer_get_url_default (&url);        mailer_get_url_default (&url);
197        fprintf (stderr, _("Creating mailer '%s' failed: %s\n"),        mu_error (_("Creating mailer '%s' failed: %s"),
198            url, mu_strerror (status));                  url, mu_strerror (status));
199        goto end;        goto end;
200      }      }
201    
# Line 214  main (int argc, char **argv) Line 213  main (int argc, char **argv)
213      {      {
214        const char *url = NULL;        const char *url = NULL;
215        mailer_get_url_default (&url);        mailer_get_url_default (&url);
216        fprintf (stderr, _("Opening mailer '%s' failed: %s\n"),        mu_error (_("Opening mailer '%s' failed: %s"),
217            url, mu_strerror (status));                  url, mu_strerror (status));
218        goto end;        goto end;
219      }      }
220    
221    if ((status = mailer_send_message (mailer, msg, from, to)))    if ((status = mailer_send_message (mailer, msg, from, to)))
222      {      {
223        fprintf (stderr, _("Sending message failed: %s\n"), mu_strerror (status));        mu_error (_("Sending message failed: %s"), mu_strerror (status));
224        goto end;        goto end;
225      }      }
226    
227    if ((status = mailer_close (mailer)))    if ((status = mailer_close (mailer)))
228      {      {
229        fprintf (stderr, _("Closing mailer failed: %s\n"), mu_strerror (status));        mu_error (_("Closing mailer failed: %s"), mu_strerror (status));
230        goto end;        goto end;
231      }      }
232    

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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