476{
477 char *subject = NULL;
478 char *include_file = NULL;
479 char *draft_file = NULL;
480 char *new_type = NULL;
481 char *dlevel = NULL;
482 char *dfile = NULL;
483#ifdef USE_NNTP
484 const char *cli_nntp = NULL;
485#endif
486 struct Email *e = NULL;
495 int version = 0;
496 int i;
497 bool explicit_folder = false;
498 bool dump_variables = false;
499 bool one_liner = false;
500 bool hide_sensitive = false;
501 bool batch_mode = false;
502 bool edit_infile = false;
503#ifdef USE_DEBUG_PARSE_TEST
504 bool test_config = false;
505#endif
506 int double_dash = argc, nargc = 1;
507 int rc = 1;
508 bool repeat_error = false;
513
515
516
517 if (getegid() != getgid())
518 {
519 mutt_error(
"%s: I don't want to run with privileges!", (argc != 0) ? argv[0] :
"neomutt");
520 goto main_exit;
521 }
522
524
525 umask(077);
526
528 for (optind = 1; optind < double_dash;)
529 {
530
531
532
533
534 for (; optind < argc; optind++)
535 {
536 if ((argv[optind][0] == '-') && (argv[optind][1] != '\0'))
537 {
538 if ((argv[optind][1] == '-') && (argv[optind][2] == '\0'))
539 double_dash = optind;
540 break;
541 }
542
543
546 else
547 argv[nargc++] = argv[optind];
548 }
549
550
551 i = getopt(argc, argv, "+A:a:Bb:F:f:c:Dd:l:Ee:g:GH:i:hm:nOpQ:RSs:TvxyzZ");
552 if (i != EOF)
553 {
554 switch (i)
555 {
556 case 'A':
558 break;
559 case 'a':
561 break;
562 case 'B':
563 batch_mode = true;
564 break;
565 case 'b':
567 break;
568 case 'c':
570 break;
571 case 'D':
572 dump_variables = true;
573 break;
574 case 'd':
575 dlevel = optarg;
576 break;
577 case 'E':
578 edit_infile = true;
579 break;
580 case 'e':
582 break;
583 case 'F':
585 break;
586 case 'f':
588 explicit_folder = true;
589 break;
590#ifdef USE_NNTP
591 case 'g':
592 cli_nntp = optarg;
593
594 case 'G':
596 break;
597#endif
598 case 'H':
599 draft_file = optarg;
600 break;
601 case 'i':
602 include_file = optarg;
603 break;
604 case 'l':
605 dfile = optarg;
606 break;
607 case 'm':
608 new_type = optarg;
609 break;
610 case 'n':
612 break;
613 case 'O':
614 one_liner = true;
615 break;
616 case 'p':
618 break;
619 case 'Q':
621 break;
622 case 'R':
624 break;
625 case 'S':
626 hide_sensitive = true;
627 break;
628 case 's':
629 subject = optarg;
630 break;
631#ifdef USE_DEBUG_PARSE_TEST
632 case 'T':
633 test_config = true;
634 break;
635#endif
636 case 'v':
637 version++;
638 break;
639 case 'y':
641 break;
642 case 'Z':
644 break;
645 case 'z':
647 break;
648 default:
651 goto main_ok;
652 else
653 goto main_curses;
654 }
655 }
656 }
657
658
659 while (optind < argc)
660 argv[nargc++] = argv[optind++];
661 optind = 1;
662 argc = nargc;
663
664 if (version > 0)
665 {
667 bool done;
668 if (version == 1)
670 else
673 if (done)
674 goto main_ok;
675 else
676 goto main_curses;
677 }
678
681
683 if (!cs)
684 goto main_curses;
685
691
692#ifdef USE_DEBUG_NOTIFY
694#endif
695
697 goto main_exit;
698
699#ifdef USE_DEBUG_PARSE_TEST
700 if (test_config)
701 {
706 goto main_ok;
707 }
708#endif
709
711
712 if (dfile)
713 {
716 }
717
718 if (dlevel)
719 {
720 short num = 0;
721 if (!mutt_str_atos_full(dlevel, &num) || (num <
LL_MESSAGE) || (num >=
LL_MAX))
722 {
723 mutt_error(
_(
"Error: value '%s' is invalid for -d"), dlevel);
724 goto main_exit;
725 }
728 }
729
733
735 {
738
741 {
743 }
744
746 {
748 }
749
752 }
753
754
756 dump_variables || batch_mode)
757 {
762 }
763
764
766 goto main_curses;
767
768
769
771
772
773
775 {
777 if (crc != 0)
778 goto main_curses;
779
780
783 }
784
785
787 if (rc2 != 0)
788 goto main_curses;
789
791
792
793 if (dlevel)
795 if (dfile)
797
799 {
801 goto main_exit;
802 }
803
804#ifdef USE_NNTP
805 {
806
807 if (!cli_nntp)
809
810 if (!cli_nntp)
812
813 if (!cli_nntp)
814 {
815 char buf[1024] = { 0 };
817 }
818
819 if (cli_nntp)
820 {
823 }
824 }
825#endif
826
827
829
830 if (new_type)
831 {
835 {
838 goto main_curses;
839 }
841 }
842
844 {
846 goto main_curses;
847 }
848
849 if (dump_variables)
850 {
852 if (hide_sensitive)
854 if (one_liner)
857 goto main_ok;
858 }
859
861 {
862 rc = 0;
863 for (; optind < argc; optind++)
867 {
869 if (al)
870 {
871
874 }
875 else
876 {
877 rc = 1;
878 printf(
"%s\n", np->
data);
879 }
880 }
882 goto main_curses;
883 }
884
886 {
888 clear();
892 }
893
894#ifdef USE_AUTOCRYPT
895
896
898 if (c_autocrypt)
900#endif
901
902
905 {
906 struct stat st = { 0 };
908
911 bool skip = false;
912#ifdef USE_IMAP
913
915#endif
916#ifdef USE_POP
918#endif
919#ifdef USE_NNTP
921#endif
923 {
924 char msg2[256];
925 snprintf(msg2,
sizeof(msg2),
_(
"%s does not exist. Create it?"), c_folder);
927 {
929 mutt_error(
_(
"Can't create %s: %s"), c_folder, strerror(errno));
930 }
931 }
933 }
934
935 if (batch_mode)
936 {
937 goto main_ok;
938 }
939
943
945 {
949 rc = 0;
950
951
953 repeat_error = true;
954 goto main_curses;
955 }
956 else if (subject || e || draft_file || include_file ||
958 {
959 FILE *fp_in = NULL;
960 FILE *fp_out = NULL;
961 char *infile = NULL;
962 char *bodytext = NULL;
963 const char *bodyfile = NULL;
964 int rv = 0;
965
968
969 if (!e)
973
974 for (i = optind; i < argc; i++)
975 {
977 {
979 {
982 goto main_curses;
983 }
984 }
985 else
987 }
988
992 {
995 goto main_curses;
996 }
997
998 if (subject)
999 {
1001 }
1002
1003 if (draft_file)
1004 {
1005 infile = draft_file;
1006 include_file = NULL;
1007 }
1008 else if (include_file)
1009 infile = include_file;
1010 else
1011 edit_infile = false;
1012
1013 if (infile || bodytext)
1014 {
1015
1016 if (infile)
1017 {
1019 {
1020 if (edit_infile)
1021 {
1024 goto main_curses;
1025 }
1026 fp_in = stdin;
1027 }
1028 else
1029 {
1033 if (!fp_in)
1034 {
1037 goto main_curses;
1038 }
1039 }
1040 }
1041
1042
1043
1044
1045 if (!edit_infile)
1046 {
1048
1050 if (!fp_out)
1051 {
1055 goto main_curses;
1056 }
1057 if (fp_in)
1058 {
1060 if (fp_in != stdin)
1062 }
1063 else if (bodytext)
1064 fputs(bodytext, fp_out);
1066
1068 if (!fp_in)
1069 {
1072 goto main_curses;
1073 }
1074 }
1075
1076
1077 else
1079
1080
1081
1082
1083 if (draft_file)
1084 {
1086 struct stat st = { 0 };
1087
1089
1090
1091
1095 if (fstat(fileno(fp_in), &st) != 0)
1096 {
1100 goto main_curses;
1101 }
1103
1105 {
1106 mutt_error(
_(
"Can't parse message template: %s"), draft_file);
1109 goto main_curses;
1110 }
1111
1112
1113 struct ListNode *np = NULL, *tmp = NULL;
1115 {
1117 {
1119 if (c_resume_edited_draft_files)
1121
1125 }
1126 }
1127
1133
1136 }
1137
1138
1139 else if (edit_infile)
1141
1142 else
1144
1146 }
1147
1149
1151 {
1153
1154 while (b && b->
next)
1156
1159 {
1160 if (b)
1161 {
1164 }
1165 else
1166 {
1169 }
1170 if (!b)
1171 {
1175 goto main_curses;
1176 }
1177 }
1179 }
1180
1182
1186
1187 if (edit_infile)
1188 {
1189 if (draft_file)
1190 {
1192 {
1195 goto main_curses;
1196 }
1198 if (!fp_out)
1199 {
1202 goto main_curses;
1203 }
1204
1205
1206
1207 if (rv < 0)
1208 {
1214 }
1215
1218 c_crypt_protected_headers_read &&
1222 if (c_resume_edited_draft_files)
1223 fprintf(fp_out, "X-Mutt-Resume-Draft: 1\n");
1224 fputc('\n', fp_out);
1226 {
1229 goto main_curses;
1230 }
1232 }
1233
1235 }
1236
1237
1240
1242
1243 if (rv != 0)
1244 goto main_curses;
1245 }
1247 {
1248
1249
1251 goto main_curses;
1252 }
1253 else
1254 {
1256 {
1257#ifdef USE_IMAP
1260#endif
1263 {
1265 goto main_curses;
1266 }
1269#ifdef USE_IMAP
1271#endif
1272 }
1274 {
1275#ifdef USE_NNTP
1277 {
1283 goto main_curses;
1284 }
1285 else
1286#endif
1288 {
1290 goto main_curses;
1291 }
1296 {
1297 goto main_ok;
1298 }
1299 }
1300
1302 {
1304 if (c_spool_file)
1305 {
1306
1308 if (m_desc)
1310 else
1312 }
1313 else if (c_folder)
1315
1316 }
1317
1318#ifdef USE_NNTP
1320 {
1324 }
1325 else
1326#endif
1328
1331
1333 {
1334
1336 {
1337 case -1:
1339 goto main_curses;
1340 case 1:
1342 goto main_curses;
1343 }
1344 }
1345
1350
1351 repeat_error = true;
1355 {
1358
1361 repeat_error = false;
1362 }
1363 if (m || !explicit_folder)
1364 {
1367
1372
1376 repeat_error = false;
1377 }
1378#ifdef USE_IMAP
1380#endif
1381#ifdef USE_SASL_CYRUS
1383#endif
1384#ifdef USE_SASL_GNU
1386#endif
1387#ifdef USE_AUTOCRYPT
1389#endif
1390
1391
1392 }
1393
1394main_ok:
1395 rc = 0;
1396main_curses:
1399
1402main_exit:
1429 return rc;
1430}
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.
int mutt_addrlist_parse(struct AddressList *al, const char *s)
Parse a list of email addresses.
void mutt_addrlist_write_file(const struct AddressList *al, FILE *fp, int start_col, bool display)
Wrapper for mutt_write_address()
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_init(void)
Set up the alternates lists.
void alternates_free(void)
Free the alternates lists.
void attach_free(void)
Free the attachments lists.
void attach_init(void)
Set up 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 mutt_buffer_select_file(struct Buffer *file, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles)
Let the user select a file.
void mutt_browser_cleanup(void)
Clean up working Buffers.
void mutt_buffer_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
bool mutt_buffer_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
@ MT_COLOR_NORMAL
Plain text.
void mutt_commands_cleanup(void)
Clean up commands globals.
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.
bool mutt_should_hide_protected_subject(struct Email *e)
Should NeoMutt hide the protected subject?
void crypto_module_free(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.
void test_parse_set(void)
Test the config parsing.
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.
struct Mailbox * mutt_index_menu(struct MuttWindow *dlg, struct Mailbox *m_init)
Display a list of emails.
struct MuttWindow * index_pager_init(void)
Allocate the Windows for the Index/Pager.
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.
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.
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_envlist_free(void)
Free the private copy of the environment.
void mutt_envlist_init(char *envp[])
Create a copy of the environment.
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.
int log_disp_terminal(time_t stamp, const char *file, int line, const char *function, enum LogLevel level,...)
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,...)
Display a log line in the message line - Implements log_dispatcher_t -.
log_dispatcher_t MuttLogger
The log dispatcher -.
int log_disp_queue(time_t stamp, const char *file, int line, const char *function, enum LogLevel level,...)
Save a log line to an internal queue - 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 changed - Implements observer_t -.
int main_log_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
void mutt_gsasl_done(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.
void mutt_opts_free(void)
Clean up before quitting.
int mutt_init(struct ConfigSet *cs, bool skip_sys_rc, struct ListHead *commands)
Initialise NeoMutt.
void init_config(struct ConfigSet *cs)
Initialise the config system.
void mutt_keys_free(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.
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.
@ 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 reset_tilde(struct ConfigSet *cs)
Temporary measure.
static bool usage(void)
Display NeoMutt command line.
static int start_curses(void)
Start the Curses UI.
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.
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_unlink_temp_attachments(void)
Delete all temporary attachments.
struct CommandArray commands
enum MuttCursorState mutt_curses_set_cursor(enum MuttCursorState state)
Set the cursor state.
struct AttrColor * mutt_curses_set_color_by_id(enum ColorId cid)
Set the colour and attributes by the colour id.
@ MUTT_CURSOR_INVISIBLE
Hide the cursor.
@ MUTT_CURSOR_VISIBLE
Display a normal cursor.
char * LastFolder
Previously selected mailbox.
bool ErrorBufMessage
true if the last message was an error
char * CurrentFolder
Currently selected mailbox.
char ErrorBuf[256]
Copy of the last error message.
struct ListHead Muttrc
List of config files to read.
void mutt_log_stop(void)
Close the log file.
int mutt_log_start(void)
Enable file logging.
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 mutt_window_free(struct MuttWindow **ptr)
Free a Window and its children.
void mutt_buffer_expand_path(struct Buffer *buf)
Create the canonical path.
#define mutt_buffer_mktemp(buf)
int mx_path_is_empty(const char *path)
Is the mailbox empty.
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.
#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 MyVarList MyVars
List of all the user's custom config variables.
void myvar_set(const char *var, const char *val)
Set the value of a "my_" variable.
void myvarlist_free(struct MyVarList *list)
Free a List of MyVars.
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_CONFIG
Config has changed, NotifyConfig, EventConfig.
@ NT_ALL
Register for all notifications.
@ NT_GLOBAL
Not object-related, NotifyGlobal.
bool OptNews
(pseudo) used to change reader mode
bool OptNoCurses
(pseudo) when sending in batch mode
bool mutt_parse_mailto(struct Envelope *env, char **body, const char *src)
Parse a mailto:// url.
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
void mutt_buffer_pool_free(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_free(void)
Cleanup heap memory allocated by compiled regexes.
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
enum QuadOption mutt_yesorno(const char *msg, 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_free(void)
Free all the default Windows.
void rootwin_set_size(int cols, int rows)
Set the dimensions of the Root Window.
void rootwin_new(void)
Create the default Windows.
void mutt_sasl_done(void)
Invoke when processing is complete.
int mutt_write_mime_body(struct Body *a, 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 EmailList *el, 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.
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.
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 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 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_free(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.