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
81d25f12
...
81d25f128f992c87dca78df64cb6c093fabc31d6
authored
2005-09-17 12:23:26 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(expand_aliases): Use mh_expand_aliases
1 parent
42dd9ada
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
33 deletions
mh/send.c
mh/send.c
View file @
81d25f1
...
...
@@ -364,41 +364,13 @@ void
expand_aliases
(
mu_message_t
msg
)
{
mu_header_t
hdr
;
size_t
i
,
num
;
char
*
buf
;
mu_address_t
addr_to
=
NULL
,
addr_cc
=
NULL
,
addr_bcc
=
NULL
;
mu_message_get_header
(
msg
,
&
hdr
);
mu_header_get_field_count
(
hdr
,
&
num
);
for
(
i
=
1
;
i
<=
num
;
i
++
)
{
if
(
mu_header_aget_field_name
(
hdr
,
i
,
&
buf
)
==
0
)
{
if
(
strcasecmp
(
buf
,
MU_HEADER_TO
)
==
0
||
strcasecmp
(
buf
,
MU_HEADER_CC
)
==
0
||
strcasecmp
(
buf
,
MU_HEADER_BCC
)
==
0
)
{
char
*
value
;
mu_address_t
addr
=
NULL
;
int
incl
;
mu_header_aget_field_value_unfold
(
hdr
,
i
,
&
value
);
mh_alias_expand
(
value
,
&
addr
,
&
incl
);
free
(
value
);
if
(
strcasecmp
(
buf
,
MU_HEADER_TO
)
==
0
)
mu_address_union
(
&
addr_to
,
addr
);
else
if
(
strcasecmp
(
buf
,
MU_HEADER_CC
)
==
0
)
mu_address_union
(
&
addr_cc
,
addr
);
else
if
(
strcasecmp
(
buf
,
MU_HEADER_BCC
)
==
0
)
mu_address_union
(
&
addr_bcc
,
addr
);
}
free
(
buf
);
}
}
addr_cc
=
NULL
,
addr_bcc
=
NULL
;
mh_expand_aliases
(
msg
,
&
addr_to
,
&
addr_cc
,
&
addr_bcc
);
mu_message_get_header
(
msg
,
&
hdr
);
if
(
addr_to
)
{
set_address_header
(
hdr
,
MU_HEADER_TO
,
addr_to
);
...
...
Please
register
or
sign in
to post a comment