summaryrefslogtreecommitdiffabout
path: root/mail.remote
authorSergey Poznyakoff <gray@gnu.org.ua>2003-01-26 13:48:34 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2003-01-26 13:48:34 (GMT)
commit594e5f5cccebdde93f349605998486280aca311c (patch) (side-by-side diff)
tree78cb3795ea1e719a4bd0983963852e0a58c97098 /mail.remote
parent2fce3d14de6bfd91076a514d4c13c809b17511d5 (diff)
downloadmailutils-594e5f5cccebdde93f349605998486280aca311c.tar.gz
mailutils-594e5f5cccebdde93f349605998486280aca311c.tar.bz2
Use mu_error instead of fprintf
Diffstat (limited to 'mail.remote') (more/less context) (ignore whitespace changes)
-rw-r--r--mail.remote/mail.remote.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/mail.remote/mail.remote.c b/mail.remote/mail.remote.c
index d8b952b..611345a 100644
--- a/mail.remote/mail.remote.c
+++ b/mail.remote/mail.remote.c
@@ -72,7 +72,7 @@ N_("GNU mail.remote -- pseudo-sendmail interface for mail delivery\n"
"the data part of the protocol transaction will also be printed to stdout.\n");
static struct argp_option options[] = {
- {"from", 'f', N_("ADDR"), 0, N_("Override the default from address\n")},
+ {"from", 'f', N_("ADDR"), 0, N_("Override the default from address")},
{"debug", 'd', NULL, 0, N_("Enable debugging output")},
{ 0, 'o', "OPT", OPTION_HIDDEN, N_("Ignored for sendmail compatibility")},
{0}
@@ -148,8 +148,8 @@ main (int argc, char **argv)
{
if ((status = address_create (&from, optfrom)))
{
- fprintf (stderr, _("Parsing from addresses failed: %s\n"),
- mu_strerror (status));
+ mu_error (_("Parsing from addresses failed: %s"),
+ mu_strerror (status));
goto end;
}
}
@@ -160,34 +160,33 @@ main (int argc, char **argv)
if ((status = address_createv (&to, (const char **) av, -1)))
{
- fprintf (stderr, _("Parsing to addresses failed: %s\n"),
- mu_strerror (status));
+ mu_error (_("Parsing to addresses failed: %s"),
+ mu_strerror (status));
goto end;
}
}
if ((status = stdio_stream_create (&in, stdin, MU_STREAM_SEEKABLE)))
{
- fprintf (stderr, _("Failed: %s\n"), mu_strerror (status));
+ mu_error (_("Failed: %s"), mu_strerror (status));
goto end;
}
if ((status = stream_open (in)))
{
- fprintf (stderr, _("Opening stdin failed: %s\n"), mu_strerror (status));
+ mu_error (_("Opening stdin failed: %s"), mu_strerror (status));
goto end;
}
if ((status = message_create (&msg, NULL)))
{
- fprintf (stderr, _("Failed: %s\n"), mu_strerror (status));
+ mu_error (_("Failed: %s"), mu_strerror (status));
goto end;
}
if ((status = message_set_stream (msg, in, NULL)))
{
- fprintf (stderr, _("Failed: %s\n"),
- mu_strerror (status));
+ mu_error (_("Failed: %s"), mu_strerror (status));
goto end;
}
@@ -195,8 +194,8 @@ main (int argc, char **argv)
{
const char *url = NULL;
mailer_get_url_default (&url);
- fprintf (stderr, _("Creating mailer '%s' failed: %s\n"),
- url, mu_strerror (status));
+ mu_error (_("Creating mailer '%s' failed: %s"),
+ url, mu_strerror (status));
goto end;
}
@@ -214,20 +213,20 @@ main (int argc, char **argv)
{
const char *url = NULL;
mailer_get_url_default (&url);
- fprintf (stderr, _("Opening mailer '%s' failed: %s\n"),
- url, mu_strerror (status));
+ mu_error (_("Opening mailer '%s' failed: %s"),
+ url, mu_strerror (status));
goto end;
}
if ((status = mailer_send_message (mailer, msg, from, to)))
{
- fprintf (stderr, _("Sending message failed: %s\n"), mu_strerror (status));
+ mu_error (_("Sending message failed: %s"), mu_strerror (status));
goto end;
}
if ((status = mailer_close (mailer)))
{
- fprintf (stderr, _("Closing mailer failed: %s\n"), mu_strerror (status));
+ mu_error (_("Closing mailer failed: %s"), mu_strerror (status));
goto end;
}

Return to:

Send suggestions and report system problems to the System administrator.