552{
553 char *subject = NULL;
554 char *include_file = NULL;
555 char *draft_file = NULL;
556 char *new_type = NULL;
557 char *dlevel = NULL;
558 char *dfile = NULL;
559 const char *cli_nntp = NULL;
560 struct Email *e = NULL;
569 int version = 0;
570 int i;
571 bool explicit_folder = false;
572 bool dump_variables = false;
573 bool one_liner = false;
574 bool hide_sensitive = false;
575 bool batch_mode = false;
576 bool edit_infile = false;
577 int double_dash = argc, nargc = 1;
578 int rc = 1;
579 bool repeat_error = false;
584
586
587
588 if (getegid() != getgid())
589 {
590 mutt_error(
"%s: I don't want to run with privileges!", (argc != 0) ? argv[0] :
"neomutt");
591 goto main_exit;
592 }
593
595
597 for (optind = 1; optind < double_dash;)
598 {
599
600
601
602
603 for (; optind < argc; optind++)
604 {
605 if ((argv[optind][0] == '-') && (argv[optind][1] != '\0'))
606 {
607 if ((argv[optind][1] == '-') && (argv[optind][2] == '\0'))
608 double_dash = optind;
609 break;
610 }
611
612
615 else
616 argv[nargc++] = argv[optind];
617 }
618
619 i = getopt(argc, argv, "+A:a:Bb:F:f:Cc:Dd:l:Ee:g:GH:i:hm:nOpQ:RSs:TvyzZ");
620 if (i != EOF)
621 {
622 switch (i)
623 {
624 case 'A':
626 break;
627 case 'a':
629 break;
630 case 'B':
631 batch_mode = true;
632 break;
633 case 'b':
635 break;
636 case 'C':
638 break;
639 case 'c':
641 break;
642 case 'D':
643 dump_variables = true;
644 break;
645 case 'd':
646 dlevel = optarg;
647 break;
648 case 'E':
649 edit_infile = true;
650 break;
651 case 'e':
653 break;
654 case 'F':
656 break;
657 case 'f':
659 explicit_folder = true;
660 break;
661 case 'g':
662 cli_nntp = optarg;
664
665 case 'G':
667 break;
668 case 'H':
669 draft_file = optarg;
670 break;
671 case 'i':
672 include_file = optarg;
673 break;
674 case 'l':
675 dfile = optarg;
676 break;
677 case 'm':
678 new_type = optarg;
679 break;
680 case 'n':
682 break;
683 case 'O':
684 one_liner = true;
685 break;
686 case 'p':
688 break;
689 case 'Q':
691 break;
692 case 'R':
694 break;
695 case 'S':
696 hide_sensitive = true;
697 break;
698 case 's':
699 subject = optarg;
700 break;
701 case 'v':
702 version++;
703 break;
704 case 'y':
706 break;
707 case 'Z':
709 break;
710 case 'z':
712 break;
713 default:
716 goto main_ok;
717 else
718 goto main_curses;
719 }
720 }
721 }
722
723
724 while (optind < argc)
725 argv[nargc++] = argv[optind++];
726 optind = 1;
727 argc = nargc;
728
729 if (version > 0)
730 {
732 bool done;
733 if (version == 1)
735 else
738 if (done)
739 goto main_ok;
740 else
741 goto main_curses;
742 }
743
746
748 if (!cs)
749 goto main_curses;
750
753
754
759
760#ifdef USE_DEBUG_NOTIFY
762#endif
763
765 goto main_exit;
766
768#ifdef ENABLE_NLS
770#endif
771
772 if (dfile)
773 {
776 }
777
778 if (dlevel)
779 {
780 short num = 0;
781 if (!mutt_str_atos_full(dlevel, &num) || (num <
LL_MESSAGE) || (num >=
LL_MAX))
782 {
783 mutt_error(
_(
"Error: value '%s' is invalid for -d"), dlevel);
784 goto main_exit;
785 }
788 }
789
795
797 {
800
803 {
805 }
806
808 {
810 }
811
814 }
815
816
818 dump_variables || batch_mode)
819 {
824 }
825
826
828 goto main_curses;
829
830
831
833 {
835 if (crc != 0)
836 goto main_curses;
837 }
838
839
840
842
844 {
845
849 }
850
851
853 if (rc2 != 0)
854 goto main_curses;
855
857
858
859 if (!cli_nntp)
861
862 if (!cli_nntp)
864
865 if (!cli_nntp)
866 {
867 char buf[1024] = { 0 };
869 }
870
871 if (cli_nntp)
872 {
875 }
876
877
879
880 if (new_type)
881 {
885 {
888 goto main_curses;
889 }
891 }
892
894 {
896 goto main_curses;
897 }
898
899 if (dump_variables)
900 {
902 if (hide_sensitive)
904 if (one_liner)
907 goto main_ok;
908 }
909
911 {
912 rc = 0;
913 for (; optind < argc; optind++)
917 {
919 if (al)
920 {
921
927 }
928 else
929 {
930 rc = 1;
932 }
933 }
935 goto main_curses;
936 }
937
939 {
941 clear();
945 }
946
947#ifdef USE_AUTOCRYPT
948
949
951 if (c_autocrypt)
953#endif
954
955
958 {
959 struct stat st = { 0 };
961
964 bool skip = false;
965
969 if (!skip && (stat(
buf_string(fpath), &st) == -1) && (errno == ENOENT))
970 {
971 char msg2[256] = { 0 };
972 snprintf(msg2,
sizeof(msg2),
_(
"%s does not exist. Create it?"), c_folder);
974 {
975 if ((mkdir(
buf_string(fpath), 0700) == -1) && (errno != EEXIST))
976 mutt_error(
_(
"Can't create %s: %s"), c_folder, strerror(errno));
977 }
978 }
980 }
981
982 if (batch_mode)
983 {
984 goto main_ok;
985 }
987
992
994 {
998 rc = 0;
999
1000
1002 repeat_error = true;
1003 goto main_curses;
1004 }
1005 else if (subject || e || draft_file || include_file ||
1007 {
1008 FILE *fp_in = NULL;
1009 FILE *fp_out = NULL;
1010 char *infile = NULL;
1011 char *bodytext = NULL;
1012 const char *bodyfile = NULL;
1013 int rv = 0;
1014
1017
1018 if (!e)
1022
1023 for (i = optind; i < argc; i++)
1024 {
1026 {
1028 {
1031 goto main_curses;
1032 }
1033 }
1034 else
1035 {
1037 }
1038 }
1039
1043 {
1046 goto main_curses;
1047 }
1048
1049 if (subject)
1050 {
1051
1054 }
1055
1056 if (draft_file)
1057 {
1058 infile = draft_file;
1059 include_file = NULL;
1060 }
1061 else if (include_file)
1062 {
1063 infile = include_file;
1064 }
1065 else
1066 {
1067 edit_infile = false;
1068 }
1069
1070 if (infile || bodytext)
1071 {
1072
1073 if (infile)
1074 {
1076 {
1077 if (edit_infile)
1078 {
1081 goto main_curses;
1082 }
1083 fp_in = stdin;
1084 }
1085 else
1086 {
1090 if (!fp_in)
1091 {
1094 goto main_curses;
1095 }
1096 }
1097 }
1098
1099 if (edit_infile)
1100 {
1101
1102
1104 }
1105 else
1106 {
1107
1108
1109
1111
1113 if (!fp_out)
1114 {
1118 goto main_curses;
1119 }
1120 if (fp_in)
1121 {
1123 if (fp_in == stdin)
1125 else
1127 }
1128 else if (bodytext)
1129 {
1130 fputs(bodytext, fp_out);
1131 }
1133
1135 if (!fp_in)
1136 {
1139 goto main_curses;
1140 }
1141 }
1142
1143
1144
1145
1146 if (draft_file)
1147 {
1149 struct stat st = { 0 };
1150
1152
1153
1154
1158 if (fstat(fileno(fp_in), &st) != 0)
1159 {
1163 goto main_curses;
1164 }
1166
1168 {
1169 mutt_error(
_(
"Can't parse message template: %s"), draft_file);
1172 goto main_curses;
1173 }
1174
1175
1176 struct ListNode *np = NULL, *tmp = NULL;
1179 {
1181 {
1182 if (c_resume_edited_draft_files)
1184
1188 }
1189 }
1190
1196
1199 }
1200
1201
1202 else if (edit_infile)
1204
1205 else
1207
1209 }
1210
1212
1214 {
1216
1217 while (b && b->
next)
1219
1222 {
1223 if (b)
1224 {
1227 }
1228 else
1229 {
1232 }
1233 if (!b)
1234 {
1238 goto main_curses;
1239 }
1240 }
1242 }
1243
1245
1249
1250 if (edit_infile)
1251 {
1252 if (draft_file)
1253 {
1254 if (truncate(
buf_string(expanded_infile), 0) == -1)
1255 {
1258 goto main_curses;
1259 }
1261 if (!fp_out)
1262 {
1265 goto main_curses;
1266 }
1267
1268
1269
1270 if (rv < 0)
1271 {
1277 }
1278
1281 c_crypt_protected_headers_read &&
1285 if (c_resume_edited_draft_files)
1286 fprintf(fp_out, "X-Mutt-Resume-Draft: 1\n");
1287 fputc('\n', fp_out);
1289 {
1292 goto main_curses;
1293 }
1295 }
1296
1298 }
1299
1300
1303
1305
1306 if (rv != 0)
1307 goto main_curses;
1308 }
1310 {
1311
1312
1314 goto main_curses;
1315 }
1316 else
1317 {
1319 {
1324 {
1326 repeat_error = true;
1327 goto main_curses;
1328 }
1332 }
1334 {
1336 {
1341 goto main_curses;
1342 }
1344 {
1346 goto main_curses;
1347 }
1351 {
1352 goto main_ok;
1353 }
1354 }
1355
1357 {
1359 if (c_spool_file)
1360 {
1361
1363 if (m_desc)
1365 else
1367 }
1368 else if (c_folder)
1369 {
1371 }
1372
1373 }
1374
1376 {
1380 }
1381 else
1382 {
1384 }
1385
1388
1390 {
1391
1393 {
1394 case -1:
1396 goto main_curses;
1397 case 1:
1399 goto main_curses;
1400 }
1401 }
1402
1404
1411
1414
1415 repeat_error = true;
1419 {
1422
1425 repeat_error = false;
1426 }
1427 if (m || !explicit_folder)
1428 {
1431
1436
1440 repeat_error = false;
1441 }
1443#ifdef USE_SASL_CYRUS
1445#endif
1446#ifdef USE_SASL_GNU
1448#endif
1449#ifdef USE_AUTOCRYPT
1451#endif
1452
1453
1454 }
1455
1456main_ok:
1457 rc = 0;
1458main_curses:
1461
1464main_exit:
1466 {
1471 }
1498 return rc;
1499}
void mutt_addrlist_copy(struct AddressList *dst, const struct AddressList *src, bool prune)
Copy a list of addresses into another list.
size_t mutt_addrlist_write(const struct AddressList *al, struct Buffer *buf, bool display)
Write an Address to a buffer.
int mutt_addrlist_parse(struct AddressList *al, const char *s)
Parse a list of email addresses.
int mutt_addrlist_to_intl(struct AddressList *al, char **err)
Convert an Address list to Punycode.
struct AddressList * alias_lookup(const char *name)
Find an Alias.
void alternates_cleanup(void)
Free the alternates lists.
void alternates_init(void)
Set up the alternates lists.
void attach_init(void)
Set up the attachments lists.
void attach_cleanup(void)
Free the attachments lists.
void mutt_autocrypt_cleanup(void)
Shutdown Autocrypt.
int mutt_autocrypt_init(bool can_create)
Initialise Autocrypt.
#define MUTT_SEL_MAILBOX
Select a mailbox.
#define MUTT_SEL_FOLDER
Select a local directory.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
void buf_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
@ MT_COLOR_NORMAL
Plain text.
bool dump_config(struct ConfigSet *cs, ConfigDumpFlags flags, FILE *fp)
Write all the config to a file.
#define CS_DUMP_HIDE_SENSITIVE
Obscure sensitive information like passwords.
uint16_t ConfigDumpFlags
Flags for dump_config(), e.g. CS_DUMP_ONLY_CHANGED.
#define CS_DUMP_NO_FLAGS
No flags are set.
#define CS_DUMP_SHOW_DOCS
Show one-liner documentation for the config item.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
void cs_free(struct ConfigSet **ptr)
Free a Config Set.
struct ConfigSet * cs_new(size_t size)
Create a new Config Set.
int cs_str_native_set(const struct ConfigSet *cs, const char *name, intptr_t value, struct Buffer *err)
Natively set the value of a string config item.
#define CSR_SUCCESS
Action completed successfully.
void config_cache_cleanup(void)
Cleanup the cache of charset config variables.
bool account_mailbox_remove(struct Account *a, struct Mailbox *m)
Remove a Mailbox from an Account.
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
struct Mailbox * mailbox_find_name(const char *name)
Find the mailbox with a given name.
struct Mailbox * mailbox_find(const char *path)
Find the mailbox with a given path.
@ MUTT_POP
'POP3' Mailbox type
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
@ MUTT_IMAP
'IMAP' Mailbox type
bool mutt_should_hide_protected_subject(struct Email *e)
Should NeoMutt hide the protected subject?
void crypto_module_cleanup(void)
Clean up the crypto modules.
void crypt_cleanup(void)
Clean up backend.
void crypt_init(void)
Initialise the crypto backends.
void mutt_flushinp(void)
Empty all the keyboard buffers.
int debug_all_observer(struct NotifyCallback *nc)
void dialog_push(struct MuttWindow *dlg)
Display a Window to the user.
void dialog_pop(void)
Hide a Window from the user.
void mutt_browser_cleanup(void)
Clean up working Buffers.
struct MuttWindow * index_pager_init(void)
Allocate the Windows for the Index/Pager.
struct Body * mutt_body_new(void)
Create a new Body.
struct Email * email_new(void)
Create a new Email.
void email_free(struct Email **ptr)
Free an Email.
bool mutt_parse_mailto(struct Envelope *env, char **body, const char *src)
Parse a mailto:// url.
void mutt_filter_commandline_header_value(char *header)
Sanitise characters in a header value.
int mutt_env_to_intl(struct Envelope *env, const char **tag, char **err)
Convert an Envelope's Address fields to Punycode format.
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
struct Envelope * mutt_env_new(void)
Create a new Envelope.
void mutt_env_set_subject(struct Envelope *env, const char *subj)
Set both subject and real_subj to subj.
void envlist_free(char ***envp)
Free the private copy of the environment.
char ** envlist_init(char **envp)
Create a copy of the environment.
void external_cleanup(void)
Clean up commands globals.
int mutt_file_copy_stream(FILE *fp_in, FILE *fp_out)
Copy the contents of one file into another.
char * mutt_file_read_keyword(const char *file, char *buf, size_t buflen)
Read a keyword from a file.
#define mutt_file_fclose(FP)
#define mutt_file_fopen(PATH, MODE)
bool OptNews
(pseudo) used to change reader mode
char * LastFolder
Previously selected mailbox.
bool OptNoCurses
(pseudo) when sending in batch mode
char ErrorBuf[1024]
Copy of the last error message.
bool ErrorBufMessage
true if the last message was an error
char * CurrentFolder
Currently selected mailbox.
struct ListHead Muttrc
List of config files to read.
char ** EnvList
Private copy of the environment variables.
void dlg_browser(struct Buffer *file, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles)
Let the user select a file -.
struct Mailbox * dlg_index(struct MuttWindow *dlg, struct Mailbox *m_init)
Display a list of emails -.
int log_disp_queue(time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format,...)
Save a log line to an internal queue - Implements log_dispatcher_t -.
int log_disp_terminal(time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format,...)
Save a log line to the terminal - Implements log_dispatcher_t -.
int log_disp_curses(time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format,...)
Display a log line in the message line - Implements log_dispatcher_t -.
#define mutt_message(...)
enum MailboxType nntp_path_probe(const char *path, const struct stat *st)
Is this an NNTP Mailbox? - Implements MxOps::path_probe() -.
enum MailboxType pop_path_probe(const char *path, const struct stat *st)
Is this a POP Mailbox? - Implements MxOps::path_probe() -.
enum MailboxType imap_path_probe(const char *path, const struct stat *st)
Is this an IMAP Mailbox? - Implements MxOps::path_probe() -.
int main_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
int main_hist_observer(struct NotifyCallback *nc)
Notification that a Config Variable has change - Implements observer_t -.
int main_timeout_observer(struct NotifyCallback *nc)
Notification that a timeout has occurred - Implements observer_t -.
int main_log_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
void mutt_gsasl_cleanup(void)
Shutdown GNU SASL library.
void mutt_startup_shutdown_hook(HookFlags type)
Execute any startup/shutdown hooks.
void mutt_folder_hook(const char *path, const char *desc)
Perform a folder hook.
#define MUTT_STARTUP_HOOK
startup-hook: run when starting NeoMutt
void imap_logout_all(void)
Close all open connections.
int mutt_query_variables(struct ListHead *queries, bool show_docs)
Implement the -Q command line flag.
int mutt_init(struct ConfigSet *cs, const char *dlevel, const char *dfile, bool skip_sys_rc, struct ListHead *commands)
Initialise NeoMutt.
void mutt_opts_cleanup(void)
Clean up before quitting.
void init_config(struct ConfigSet *cs)
Initialise the config system.
void mutt_keys_cleanup(void)
Free the key maps.
void mutt_init_abort_key(void)
Parse the abort_key config string.
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
int(*) log_dispatcher_ MuttLogger)
@ LL_DEBUG3
Log at debug level 3.
@ LL_MESSAGE
Log informational message.
@ LL_NOTIFY
Log of notifications.
#define MUTT_CLI_SELECT
-y Start with a list of all mailboxes
static void init_locale(void)
Initialise the Locale/NLS settings.
static void localise_config(struct ConfigSet *cs)
Localise some config.
uint8_t CliFlags
Flags for command line options, e.g. MUTT_CLI_IGNORE.
static void log_translation(void)
Log the translation being used.
#define MUTT_CLI_MAILBOX
-Z Open first mailbox if is has new mail
static void log_gui(void)
Log info about the GUI.
static void reset_tilde(struct ConfigSet *cs)
Temporary measure.
static bool usage(void)
Display NeoMutt command line.
static int start_curses(void)
Start the Curses UI.
bool StartupComplete
When the config has been read.
static bool get_user_info(struct ConfigSet *cs)
Find the user's name, home and shell.
#define MUTT_CLI_RO
-R Open mailbox in read-only mode
#define MUTT_CLI_NO_FLAGS
No flags are set.
#define MUTT_CLI_IGNORE
-z Open first mailbox if it has mail
#define MUTT_CLI_NEWS
-g/-G Start with a list of all newsgroups
#define MUTT_CLI_NOSYSRC
-n Do not read the system-wide config file
struct Body * mutt_make_multipart(struct Body *b)
Create a multipart email.
void mutt_ch_cache_cleanup(void)
Clean up the cached iconv handles and charset strings.
void log_queue_empty(void)
Free the contents of the queue.
void log_queue_set_max_size(int size)
Set a upper limit for the queue length.
void log_queue_flush(log_dispatcher_t disp)
Replay the log queue.
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
size_t mutt_istr_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix, ignoring case.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
void mutt_temp_attachments_cleanup(void)
Delete all temporary attachments.
enum MuttCursorState mutt_curses_set_cursor(enum MuttCursorState state)
Set the cursor state.
const struct AttrColor * mutt_curses_set_color_by_id(enum ColorId cid)
Set the colour and attributes by the colour id.
void mutt_resize_screen(void)
Update NeoMutt's opinion about the window size.
@ MUTT_CURSOR_INVISIBLE
Hide the cursor.
@ MUTT_CURSOR_VISIBLE
Display a normal cursor.
void mutt_log_stop(void)
Close the log file.
void mutt_log_prep(void)
Prepare to log.
int mutt_mailbox_check(struct Mailbox *m_cur, CheckStatsFlags flags)
Check all all Mailboxes for new mail.
struct Mailbox * mutt_mailbox_next(struct Mailbox *m_cur, struct Buffer *s)
Incoming folders completion routine.
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
void mutt_window_free(struct MuttWindow **ptr)
Free a Window and its children.
void buf_expand_path(struct Buffer *buf)
Create the canonical path.
bool mx_mbox_open(struct Mailbox *m, OpenMailboxFlags flags)
Open a mailbox and parse it.
struct Mailbox * mx_resolve(const char *path_or_name)
Get a Mailbox from either a path or name.
int mx_path_is_empty(struct Buffer *path)
Is the mailbox empty.
#define MUTT_READONLY
Open in read-only mode.
#define MUTT_MAILBOX_CHECK_IMMEDIATE
Don't postpone the actual checking.
#define MUTT_OPEN_NO_FLAGS
No flags are set.
uint8_t CheckStatsFlags
Flags for mutt_mailbox_check.
struct NeoMutt * neomutt_new(struct ConfigSet *cs)
Create the main NeoMutt object.
void neomutt_free(struct NeoMutt **ptr)
Free a NeoMutt.
@ NT_GLOBAL_STARTUP
NeoMutt is initialised.
void nntp_expand_path(char *buf, size_t buflen, struct ConnAccount *acct)
Make fully qualified url from newsgroup name.
struct NntpAccountData * CurrentNewsSrv
Current NNTP news server.
struct NntpAccountData * nntp_select_server(struct Mailbox *m, const char *server, bool leave_lock)
Open a connection to an NNTP server.
@ NT_TIMEOUT
Timeout has occurred.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
@ NT_ALL
Register for all notifications.
@ NT_GLOBAL
Not object-related, NotifyGlobal.
@ NT_RESIZE
Window has been resized.
void buf_pool_cleanup(void)
Release the Buffer pool.
int mutt_prepare_template(FILE *fp, struct Mailbox *m, struct Email *e_new, struct Email *e, bool resend)
Prepare a message template.
void mutt_prex_cleanup(void)
Cleanup heap memory allocated by compiled regexes.
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
enum QuadOption query_yesorno(const char *prompt, enum QuadOption def)
Ask the user a Yes/No question.
#define STAILQ_REMOVE(head, elm, type, field)
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_EMPTY(head)
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
#define TAILQ_EMPTY(head)
void rootwin_cleanup(void)
Free all the default Windows.
void rootwin_new(void)
Create the default Windows.
void mutt_sasl_cleanup(void)
Invoke when processing is complete.
int mutt_write_mime_body(struct Body *b, FILE *fp, struct ConfigSubset *sub)
Write a MIME part.
void mutt_encode_descriptions(struct Body *b, bool recurse, struct ConfigSubset *sub)
RFC2047 encode the content-descriptions.
int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile, struct Mailbox *m, struct EmailArray *ea, struct ConfigSubset *sub)
Send an email.
#define SEND_BATCH
Send email in batch mode (without user interaction)
#define SEND_NO_FREE_HEADER
Used by the -E flag.
#define SEND_DRAFT_FILE
Used by the -H flag.
uint32_t SendFlags
Flags for mutt_send_message(), e.g. SEND_REPLY.
#define SEND_POSTPONED
Recall a postponed email.
#define SEND_CONSUMED_STDIN
stdin has been read; don't read it twice
#define SEND_CLI_CRYPTO
Enable message security in modes that by default don't enable it.
#define SEND_NO_FLAGS
No flags are set.
struct Body * mutt_make_file_attach(const char *path, struct ConfigSubset *sub)
Create a file attachment.
void mutt_prepare_envelope(struct Envelope *env, bool final, struct ConfigSubset *sub)
Prepare an email header.
LOFF_T length
length (in bytes) of attachment
struct Body * next
next attachment in the list
size_t dsize
Length of data.
Container for lots of config items.
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
struct ConnAccount account
Account details: username, password, etc.
The envelope/body of an email.
struct Envelope * env
Envelope information.
struct Body * body
List of MIME parts.
LOFF_T offset
Where in the stream does this message begin?
struct ListHead userhdrs
user defined headers
char *const subject
Email's subject.
struct AddressList to
Email's 'To' list.
struct AddressList cc
Email's 'Cc' list.
struct AddressList bcc
Email's 'Bcc' list.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
char * name
A short name for the Mailbox.
struct Account * account
Account that owns this Mailbox.
Container for Accounts, Notifications.
struct Notify * notify_resize
Window resize notifications handler.
struct AccountList accounts
List of all Accounts.
mode_t user_default_umask
User's default file writing permissions (inferred from umask)
struct Notify * notify
Notifications handler.
struct ConfigSubset * sub
Inherited config items.
struct Connection * conn
Connection to NNTP Server.
void subjrx_init(void)
Create new Subject Regex List.
void subjrx_cleanup(void)
Free the Subject Regex List.
int cs_subset_str_native_set(const struct ConfigSubset *sub, const char *name, intptr_t value, struct Buffer *err)
Natively set the value of a string config item.
bool TsSupported
Terminal Setting is supported.
bool mutt_ts_capability(void)
Check terminal capabilities.
enum UrlScheme url_check_scheme(const char *str)
Check the protocol of a URL.
@ U_MAILTO
Url is mailto://.
bool print_copyright(void)
Print copyright message.
bool print_version(FILE *fp)
Print system and compile info to a file.