summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/main.c b/main.c
index 87d16ad..9c4f414 100644
--- a/main.c
+++ b/main.c
@@ -334,11 +334,6 @@ int main (int argc, char **argv)
case 't':
/* Read recipients from message */
- if(!message_parse_headers(message))
- {
- fprintf(stderr, "No recipients found\n");
- exit(EX_DATAERR);
- }
parse_headers = 1;
break;
@@ -377,6 +372,16 @@ int main (int argc, char **argv)
*/
rcfile_parse(rcfile);
+ /* Read recipients from message */
+ if (parse_headers)
+ {
+ if (!message_parse_headers(message))
+ {
+ fprintf(stderr, "No recipients found\n");
+ exit(EX_DATAERR);
+ }
+ }
+
/* Add remaining program arguments as message recipients. */
while (optind < argc)
message_add_recipient(message, argv[optind++]);