1 |
/* GNU mailutils - a suite of utilities for electronic mail |
/* GNU Mailutils -- a suite of utilities for electronic mail |
2 |
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. |
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
GNU Mailutils is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Library Public License as published by |
it under the terms of the GNU General Library Public License as published by |
6 |
the Free Software Foundation; either version 2, or (at your option) |
the Free Software Foundation; either version 2, or (at your option) |
7 |
any later version. |
any later version. |
8 |
|
|
9 |
This program is distributed in the hope that it will be useful, |
GNU Mailutils is distributed in the hope that it will be useful, |
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
GNU Library General Public License for more details. |
GNU Library General Public License for more details. |
13 |
|
|
14 |
You should have received a copy of the GNU Library General Public License |
You should have received a copy of the GNU Library General Public License |
15 |
along with this program; if not, write to the Free Software |
along with GNU Mailutils; if not, write to the Free Software |
16 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
17 |
|
|
18 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
48 |
#include <mailutils/observer.h> |
#include <mailutils/observer.h> |
49 |
#include <mailutils/stream.h> |
#include <mailutils/stream.h> |
50 |
#include <mailutils/mu_auth.h> |
#include <mailutils/mu_auth.h> |
51 |
|
#include <mailutils/nls.h> |
52 |
|
|
53 |
#define MESSAGE_MODIFIED 0x10000; |
#define MESSAGE_MODIFIED 0x10000; |
54 |
|
|
1065 |
if ((rc = mailbox_create_default (&to, toname))) |
if ((rc = mailbox_create_default (&to, toname))) |
1066 |
{ |
{ |
1067 |
mu_debug_print (debug, MU_DEBUG_TRACE, |
mu_debug_print (debug, MU_DEBUG_TRACE, |
1068 |
"mailbox_create_default (%s) failed: %s\n", toname, |
_("mailbox_create_default (%s) failed: %s\n"), toname, |
1069 |
mu_errstring (rc)); |
mu_errstring (rc)); |
1070 |
goto end; |
goto end; |
1071 |
} |
} |
1096 |
if ((rc = mailbox_open (to, MU_STREAM_WRITE | MU_STREAM_CREAT))) |
if ((rc = mailbox_open (to, MU_STREAM_WRITE | MU_STREAM_CREAT))) |
1097 |
{ |
{ |
1098 |
mu_debug_print (debug, MU_DEBUG_TRACE, |
mu_debug_print (debug, MU_DEBUG_TRACE, |
1099 |
"mailbox_open (%s) failed: %s\n", toname, |
_("mailbox_open (%s) failed: %s\n"), toname, |
1100 |
mu_errstring (rc)); |
mu_errstring (rc)); |
1101 |
goto end; |
goto end; |
1102 |
} |
} |
1104 |
if ((rc = mailbox_append_message (to, msg))) |
if ((rc = mailbox_append_message (to, msg))) |
1105 |
{ |
{ |
1106 |
mu_debug_print (debug, MU_DEBUG_TRACE, |
mu_debug_print (debug, MU_DEBUG_TRACE, |
1107 |
"mailbox_append_message (%s) failed: %s\n", toname, |
_("mailbox_append_message (%s) failed: %s\n"), toname, |
1108 |
mu_errstring (rc)); |
mu_errstring (rc)); |
1109 |
goto end; |
goto end; |
1110 |
} |
} |
1116 |
if ((rc = mailbox_close (to))) |
if ((rc = mailbox_close (to))) |
1117 |
{ |
{ |
1118 |
mu_debug_print (debug, MU_DEBUG_TRACE, |
mu_debug_print (debug, MU_DEBUG_TRACE, |
1119 |
"mailbox_close (%s) failed: %s\n", toname, |
_("mailbox_close (%s) failed: %s\n"), toname, |
1120 |
mu_errstring (rc)); |
mu_errstring (rc)); |
1121 |
} |
} |
1122 |
} |
} |