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
2cb73f9f
...
2cb73f9f26f42a3b39e1e839dba022c80cef53f7
authored
2004-05-07 06:07:50 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(util_get_sender): Updated to match recent changes (see the previous entry).
1 parent
778acd52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
mail/util.c
mail/util.c
View file @
2cb73f9
...
...
@@ -645,19 +645,18 @@ util_folder_path (const char *name)
}
char
*
util_get_sender
(
int
msgno
,
int
strip
)
util_get_sender
(
int
msgno
,
int
strip
)
{
header_t
header
=
NULL
;
address_t
addr
=
NULL
;
message_t
msg
=
NULL
;
char
buffer
[
512
],
*
p
;
address_t
addr
=
NULL
;
char
*
buf
=
NULL
,
*
p
;
mailbox_get_message
(
mbox
,
msgno
,
&
msg
);
message_get_header
(
msg
,
&
header
);
if
(
header_get_value
(
header
,
MU_HEADER_FROM
,
buffer
,
sizeof
(
buffer
),
NULL
)
||
address_create
(
&
addr
,
buffer
))
addr
=
get_sender_address
(
msg
);
if
(
!
addr
)
{
envelope_t
env
=
NULL
;
char
buffer
[
512
];
message_get_envelope
(
msg
,
&
env
);
if
(
envelope_sender
(
env
,
buffer
,
sizeof
(
buffer
),
NULL
)
||
address_create
(
&
addr
,
buffer
))
...
...
@@ -667,7 +666,7 @@ util_get_sender(int msgno, int strip)
}
}
if
(
address_
get_email
(
addr
,
1
,
buffer
,
sizeof
(
buffer
),
NULL
))
if
(
address_
aget_email
(
addr
,
1
,
&
buf
))
{
util_error
(
_
(
"can't determine sender name (msg %d)"
),
msgno
);
address_destroy
(
&
addr
);
...
...
@@ -676,18 +675,17 @@ util_get_sender(int msgno, int strip)
if
(
strip
)
{
p
=
strchr
(
buf
fer
,
'@'
);
p
=
strchr
(
buf
,
'@'
);
if
(
p
)
*
p
=
0
;
}
p
=
strdup
(
buffer
);
address_destroy
(
&
addr
);
return
p
;
return
buf
;
}
void
util_slist_print
(
list_t
list
,
int
nl
)
util_slist_print
(
list_t
list
,
int
nl
)
{
iterator_t
itr
;
char
*
name
;
...
...
@@ -705,7 +703,7 @@ util_slist_print(list_t list, int nl)
}
int
util_slist_lookup
(
list_t
list
,
char
*
str
)
util_slist_lookup
(
list_t
list
,
char
*
str
)
{
iterator_t
itr
;
char
*
name
;
...
...
Please
register
or
sign in
to post a comment