Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
3af8e43d
...
3af8e43d65527e7723ed0950a7c8d979a794508b
authored
2006-05-20 10:41:20 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(save_fcc): Handle comma-delimited folder lists in Fcc lines.
1 parent
3280d3ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
mailbox/mailer.c
mailbox/mailer.c
View file @
3af8e43
...
...
@@ -253,7 +253,7 @@ save_fcc (mu_message_t msg)
{
mu_header_t
hdr
;
size_t
count
=
0
,
i
;
char
buf
[
512
];
char
buf
[
512
]
,
*
fcc
;
if
(
mu_message_get_header
(
msg
,
&
hdr
))
return
;
...
...
@@ -267,19 +267,29 @@ save_fcc (mu_message_t msg)
mu_mailbox_t
mbox
;
mu_header_get_field_name
(
hdr
,
i
,
buf
,
sizeof
buf
,
NULL
);
if
(
strcasecmp
(
buf
,
MU_HEADER_FCC
)
==
0
)
if
(
strcasecmp
(
buf
,
MU_HEADER_FCC
)
==
0
&&
mu_header_aget_field_value
(
hdr
,
i
,
&
fcc
)
==
0
)
{
i
f
(
mu_header_get_field_value
(
hdr
,
i
,
buf
,
sizeof
buf
,
NULL
))
continue
;
if
(
mu_mailbox_create_default
(
&
mbox
,
buf
))
continue
;
/*FIXME: error message?? */
if
(
mu_mailbox_open
(
mbox
,
MU_STREAM_RDWR
|
MU_STREAM_CREAT
|
MU_STREAM_APPEND
)
==
0
)
i
nt
i
,
argc
;
char
**
argv
;
mu_argcv_get
(
fcc
,
","
,
NULL
,
&
argc
,
&
argv
);
for
(
i
=
0
;
i
<
argc
;
i
+=
2
)
{
mu_mailbox_append_message
(
mbox
,
msg
);
mu_mailbox_flush
(
mbox
,
0
);
if
(
mu_mailbox_create_default
(
&
mbox
,
argv
[
i
]))
continue
;
/*FIXME: error message?? */
if
(
mu_mailbox_open
(
mbox
,
MU_STREAM_RDWR
|
MU_STREAM_CREAT
|
MU_STREAM_APPEND
)
==
0
)
{
mu_mailbox_append_message
(
mbox
,
msg
);
mu_mailbox_flush
(
mbox
,
0
);
}
mu_mailbox_close
(
mbox
);
mu_mailbox_destroy
(
&
mbox
);
}
mu_
mailbox_close
(
mbox
);
mu_mailbox_destroy
(
&
mbox
);
mu_
argcv_free
(
argc
,
argv
);
free
(
fcc
);
}
}
}
...
...
Please
register
or
sign in
to post a comment