513{
514 char *subject = NULL;
515 char *include_file = NULL;
516 char *draft_file = NULL;
517 char *new_type = NULL;
518 char *dlevel = NULL;
519 char *dfile = NULL;
520 const char *cli_nntp = NULL;
521 struct Email *e = NULL;
530 int version = 0;
531 int i;
532 bool explicit_folder = false;
533 bool dump_variables = false;
534 bool one_liner = false;
535 bool hide_sensitive = false;
536 bool batch_mode = false;
537 bool edit_infile = false;
538 int double_dash = argc, nargc = 1;
539 int rc = 1;
540 bool repeat_error = false;
545
547
548
549 if (getegid() != getgid())
550 {
551 mutt_error(
"%s: I don't want to run with privileges!", (argc != 0) ? argv[0] :
"neomutt");
552 goto main_exit;
553 }
554
556
557 umask(077);
558
560 for (optind = 1; optind < double_dash;)
561 {
562
563
564
565
566 for (; optind < argc; optind++)
567 {
568 if ((argv[optind][0] == '-') && (argv[optind][1] != '\0'))
569 {
570 if ((argv[optind][1] == '-') && (argv[optind][2] == '\0'))
571 double_dash = optind;
572 break;
573 }
574
575
578 else
579 argv[nargc++] = argv[optind];
580 }
581
582 i = getopt(argc, argv, "+A:a:Bb:F:f:c:Dd:l:Ee:g:GH:i:hm:nOpQ:RSs:TvxyzZ");
583 if (i != EOF)
584 {
585 switch (i)
586 {
587 case 'A':
589 break;
590 case 'a':
592 break;
593 case 'B':
594 batch_mode = true;
595 break;
596 case 'b':
598 break;
599 case 'c':
601 break;
602 case 'D':
603 dump_variables = true;
604 break;
605 case 'd':
606 dlevel = optarg;
607 break;
608 case 'E':
609 edit_infile = true;
610 break;
611 case 'e':
613 break;
614 case 'F':
616 break;
617 case 'f':
619 explicit_folder = true;
620 break;
621 case 'g':
622 cli_nntp = optarg;
624
625 case 'G':
627 break;
628 case 'H':
629 draft_file = optarg;
630 break;
631 case 'i':
632 include_file = optarg;
633 break;
634 case 'l':
635 dfile = optarg;
636 break;
637 case 'm':
638 new_type = optarg;
639 break;
640 case 'n':
642 break;
643 case 'O':
644 one_liner = true;
645 break;
646 case 'p':
648 break;
649 case 'Q':
651 break;
652 case 'R':
654 break;
655 case 'S':
656 hide_sensitive = true;
657 break;
658 case 's':
659 subject = optarg;
660 break;
661 case 'v':
662 version++;
663 break;
664 case 'y':
666 break;
667 case 'Z':
669 break;
670 case 'z':
672 break;
673 default:
676 goto main_ok;
677 else
678 goto main_curses;
679 }
680 }
681 }
682
683
684 while (optind < argc)
685 argv[nargc++] = argv[optind++];
686 optind = 1;
687 argc = nargc;
688
689 if (version > 0)
690 {
692 bool done;
693 if (version == 1)
695 else
698 if (done)
699 goto main_ok;
700 else
701 goto main_curses;
702 }
703
706
708 if (!cs)
709 goto main_curses;
710
716
717#ifdef USE_DEBUG_NOTIFY
719#endif
720
722 goto main_exit;
723
725
726 if (dfile)
727 {
730 }
731
732 if (dlevel)
733 {
734 short num = 0;
735 if (!mutt_str_atos_full(dlevel, &num) || (num <
LL_MESSAGE) || (num >=
LL_MAX))
736 {
737 mutt_error(
_(
"Error: value '%s' is invalid for -d"), dlevel);
738 goto main_exit;
739 }
742 }
743
747
749 {
752
755 {
757 }
758
760 {
762 }
763
766 }
767
768
770 dump_variables || batch_mode)
771 {
776 }
777
778
780 goto main_curses;
781
782
783
785 {
787 if (crc != 0)
788 goto main_curses;
789 }
790
791
792
794
796 {
797
801 }
802
803
805 if (rc2 != 0)
806 goto main_curses;
807
809
810
811 if (!cli_nntp)
813
814 if (!cli_nntp)
816
817 if (!cli_nntp)
818 {
819 char buf[1024] = { 0 };
821 }
822
823 if (cli_nntp)
824 {
827 }
828
829
831
832 if (new_type)
833 {
837 {
840 goto main_curses;
841 }
843 }
844
846 {
848 goto main_curses;
849 }
850
851 if (dump_variables)
852 {
854 if (hide_sensitive)
856 if (one_liner)
859 goto main_ok;
860 }
861
863 {
864 rc = 0;
865 for (; optind < argc; optind++)
869 {
871 if (al)
872 {
873
879 }
880 else
881 {
882 rc = 1;
883 printf(
"%s\n", np->
data);
884 }
885 }
887 goto main_curses;
888 }
889
891 {
893 clear();
897 }
898
899#ifdef USE_AUTOCRYPT
900
901
903 if (c_autocrypt)
905#endif
906
907
910 {
911 struct stat st = { 0 };
913
916 bool skip = false;
917
921 if (!skip && (stat(
buf_string(fpath), &st) == -1) && (errno == ENOENT))
922 {
923 char msg2[256];
924 snprintf(msg2,
sizeof(msg2),
_(
"%s does not exist. Create it?"), c_folder);
926 {
927 if ((mkdir(
buf_string(fpath), 0700) == -1) && (errno != EEXIST))
928 mutt_error(
_(
"Can't create %s: %s"), c_folder, strerror(errno));
929 }
930 }
932 }
933
934 if (batch_mode)
935 {
936 goto main_ok;
937 }
939
944
946 {
950 rc = 0;
951
952
954 repeat_error = true;
955 goto main_curses;
956 }
957 else if (subject || e || draft_file || include_file ||
959 {
960 FILE *fp_in = NULL;
961 FILE *fp_out = NULL;
962 char *infile = NULL;
963 char *bodytext = NULL;
964 const char *bodyfile = NULL;
965 int rv = 0;
966
969
970 if (!e)
974
975 for (i = optind; i < argc; i++)
976 {
978 {
980 {
983 goto main_curses;
984 }
985 }
986 else
987 {
989 }
990 }
991
995 {
998 goto main_curses;
999 }
1000
1001 if (subject)
1002 {
1004 }
1005
1006 if (draft_file)
1007 {
1008 infile = draft_file;
1009 include_file = NULL;
1010 }
1011 else if (include_file)
1012 {
1013 infile = include_file;
1014 }
1015 else
1016 {
1017 edit_infile = false;
1018 }
1019
1020 if (infile || bodytext)
1021 {
1022
1023 if (infile)
1024 {
1026 {
1027 if (edit_infile)
1028 {
1031 goto main_curses;
1032 }
1033 fp_in = stdin;
1034 }
1035 else
1036 {
1039 fp_in = fopen(
buf_string(&expanded_infile),
"r");
1040 if (!fp_in)
1041 {
1044 goto main_curses;
1045 }
1046 }
1047 }
1048
1049 if (edit_infile)
1050 {
1051
1052
1054 }
1055 else
1056 {
1057
1058
1059
1061
1063 if (!fp_out)
1064 {
1068 goto main_curses;
1069 }
1070 if (fp_in)
1071 {
1073 if (fp_in != stdin)
1075 }
1076 else if (bodytext)
1077 {
1078 fputs(bodytext, fp_out);
1079 }
1081
1083 if (!fp_in)
1084 {
1087 goto main_curses;
1088 }
1089 }
1090
1091
1092
1093
1094 if (draft_file)
1095 {
1097 struct stat st = { 0 };
1098
1100
1101
1102
1106 if (fstat(fileno(fp_in), &st) != 0)
1107 {
1111 goto main_curses;
1112 }
1114
1116 {
1117 mutt_error(
_(
"Can't parse message template: %s"), draft_file);
1120 goto main_curses;
1121 }
1122
1123
1124 struct ListNode *np = NULL, *tmp = NULL;
1127 {
1129 {
1130 if (c_resume_edited_draft_files)
1132
1136 }
1137 }
1138
1144
1147 }
1148
1149
1150 else if (edit_infile)
1152
1153 else
1155
1157 }
1158
1160
1162 {
1164
1165 while (b && b->
next)
1167
1170 {
1171 if (b)
1172 {
1175 }
1176 else
1177 {
1180 }
1181 if (!b)
1182 {
1186 goto main_curses;
1187 }
1188 }
1190 }
1191
1193
1197
1198 if (edit_infile)
1199 {
1200 if (draft_file)
1201 {
1202 if (truncate(
buf_string(&expanded_infile), 0) == -1)
1203 {
1206 goto main_curses;
1207 }
1209 if (!fp_out)
1210 {
1213 goto main_curses;
1214 }
1215
1216
1217
1218 if (rv < 0)
1219 {
1225 }
1226
1229 c_crypt_protected_headers_read &&
1233 if (c_resume_edited_draft_files)
1234 fprintf(fp_out, "X-Mutt-Resume-Draft: 1\n");
1235 fputc('\n', fp_out);
1237 {
1240 goto main_curses;
1241 }
1243 }
1244
1246 }
1247
1248
1251
1253
1254 if (rv != 0)
1255 goto main_curses;
1256 }
1258 {
1259
1260
1262 goto main_curses;
1263 }
1264 else
1265 {
1267 {
1272 {
1274 goto main_curses;
1275 }
1279 }
1281 {
1283 {
1289 goto main_curses;
1290 }
1292 {
1294 goto main_curses;
1295 }
1300 {
1301 goto main_ok;
1302 }
1303 }
1304
1306 {
1308 if (c_spool_file)
1309 {
1310
1312 if (m_desc)
1314 else
1316 }
1317 else if (c_folder)
1318 {
1320 }
1321
1322 }
1323
1325 {
1329 }
1330 else
1331 {
1333 }
1334
1337
1339 {
1340
1342 {
1343 case -1:
1345 goto main_curses;
1346 case 1:
1348 goto main_curses;
1349 }
1350 }
1351
1356
1359
1360 repeat_error = true;
1364 {
1367
1370 repeat_error = false;
1371 }
1372 if (m || !explicit_folder)
1373 {
1376
1381
1385 repeat_error = false;
1386 }
1388#ifdef USE_SASL_CYRUS
1390#endif
1391#ifdef USE_SASL_GNU
1393#endif
1394#ifdef USE_AUTOCRYPT
1396#endif
1397
1398
1399 }
1400
1401main_ok:
1402 rc = 0;
1403main_curses:
1406
1409main_exit:
1411 {
1416 }
1443 return rc;
1444}
bool account_mailbox_remove(struct Account *a, struct Mailbox *m)
Remove a Mailbox from an Account.
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.
void buf_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
struct Buffer buf_make(size_t size)
Make a new buffer on the stack.
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.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
@ 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 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.
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 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.
FILE * mutt_file_fopen(const char *path, const char *mode)
Call fopen() safely.
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
char * mutt_file_read_keyword(const char *file, char *buf, size_t buflen)
Read a keyword from a file.
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.
struct Mailbox * get_current_mailbox(void)
Get the current Mailbox.
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_MESSAGE
Log informational message.
@ LL_NOTIFY
Log of notifications.
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
struct Mailbox * mailbox_find_name(const char *name)
Find the mailbox with a given name.
@ MUTT_POP
'POP3' Mailbox type
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
@ MUTT_IMAP
'IMAP' Mailbox type
#define MUTT_CLI_SELECT
-y Start with a list of all mailboxes
static void init_locale(void)
Initialise the Locale/NLS settings.
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.
#define MUTT_MAILBOX_CHECK_FORCE
Ignore MailboxTime and check for new mail.
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.
#define SEND_POSTPONED
Recall a postponed email.
#define SEND_NO_FLAGS
No flags are set.
uint16_t SendFlags
Flags for mutt_send_message(), e.g. SEND_REPLY.
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
struct AddressList to
Email's 'To' list.
struct AddressList cc
Email's 'Cc' list.
char * subject
Email's subject.
struct AddressList bcc
Email's 'Bcc' list.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
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.
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.