471{
472 char *subject = NULL;
473 char *include_file = NULL;
474 char *draft_file = NULL;
475 char *new_type = NULL;
476 char *dlevel = NULL;
477 char *dfile = NULL;
478#ifdef USE_NNTP
479 const char *cli_nntp = NULL;
480#endif
481 struct Email *e = NULL;
490 int version = 0;
491 int i;
492 bool explicit_folder = false;
493 bool dump_variables = false;
494 bool one_liner = false;
495 bool hide_sensitive = false;
496 bool batch_mode = false;
497 bool edit_infile = false;
498 int double_dash = argc, nargc = 1;
499 int rc = 1;
500 bool repeat_error = false;
505
507
508
509 if (getegid() != getgid())
510 {
511 mutt_error(
"%s: I don't want to run with privileges!", (argc != 0) ? argv[0] :
"neomutt");
512 goto main_exit;
513 }
514
516
517 umask(077);
518
520 for (optind = 1; optind < double_dash;)
521 {
522
523
524
525
526 for (; optind < argc; optind++)
527 {
528 if ((argv[optind][0] == '-') && (argv[optind][1] != '\0'))
529 {
530 if ((argv[optind][1] == '-') && (argv[optind][2] == '\0'))
531 double_dash = optind;
532 break;
533 }
534
535
538 else
539 argv[nargc++] = argv[optind];
540 }
541
542
543 i = getopt(argc, argv, "+A:a:Bb:F:f:c:Dd:l:Ee:g:GH:i:hm:nOpQ:RSs:TvxyzZ");
544 if (i != EOF)
545 {
546 switch (i)
547 {
548 case 'A':
550 break;
551 case 'a':
553 break;
554 case 'B':
555 batch_mode = true;
556 break;
557 case 'b':
559 break;
560 case 'c':
562 break;
563 case 'D':
564 dump_variables = true;
565 break;
566 case 'd':
567 dlevel = optarg;
568 break;
569 case 'E':
570 edit_infile = true;
571 break;
572 case 'e':
574 break;
575 case 'F':
577 break;
578 case 'f':
580 explicit_folder = true;
581 break;
582#ifdef USE_NNTP
583 case 'g':
584 cli_nntp = optarg;
585
586 case 'G':
588 break;
589#endif
590 case 'H':
591 draft_file = optarg;
592 break;
593 case 'i':
594 include_file = optarg;
595 break;
596 case 'l':
597 dfile = optarg;
598 break;
599 case 'm':
600 new_type = optarg;
601 break;
602 case 'n':
604 break;
605 case 'O':
606 one_liner = true;
607 break;
608 case 'p':
610 break;
611 case 'Q':
613 break;
614 case 'R':
616 break;
617 case 'S':
618 hide_sensitive = true;
619 break;
620 case 's':
621 subject = optarg;
622 break;
623 case 'v':
624 version++;
625 break;
626 case 'y':
628 break;
629 case 'Z':
631 break;
632 case 'z':
634 break;
635 default:
638 goto main_ok;
639 else
640 goto main_curses;
641 }
642 }
643 }
644
645
646 while (optind < argc)
647 argv[nargc++] = argv[optind++];
648 optind = 1;
649 argc = nargc;
650
651 if (version > 0)
652 {
654 bool done;
655 if (version == 1)
657 else
660 if (done)
661 goto main_ok;
662 else
663 goto main_curses;
664 }
665
668
670 if (!cs)
671 goto main_curses;
672
678
679#ifdef USE_DEBUG_NOTIFY
681#endif
682
684 goto main_exit;
685
687
688 if (dfile)
689 {
692 }
693
694 if (dlevel)
695 {
696 short num = 0;
697 if (!mutt_str_atos_full(dlevel, &num) || (num <
LL_MESSAGE) || (num >=
LL_MAX))
698 {
699 mutt_error(
_(
"Error: value '%s' is invalid for -d"), dlevel);
700 goto main_exit;
701 }
704 }
705
709
711 {
714
717 {
719 }
720
722 {
724 }
725
728 }
729
730
732 dump_variables || batch_mode)
733 {
738 }
739
740
742 goto main_curses;
743
744
745
747
748
749
751 {
753 if (crc != 0)
754 goto main_curses;
755
756
759 }
760
761
763 if (rc2 != 0)
764 goto main_curses;
765
767
768
769 if (dlevel)
771 if (dfile)
773
775 {
777 goto main_exit;
778 }
779
780#ifdef USE_NNTP
781 {
782
783 if (!cli_nntp)
785
786 if (!cli_nntp)
788
789 if (!cli_nntp)
790 {
791 char buf[1024] = { 0 };
793 }
794
795 if (cli_nntp)
796 {
799 }
800 }
801#endif
802
803
805
806 if (new_type)
807 {
811 {
814 goto main_curses;
815 }
817 }
818
820 {
822 goto main_curses;
823 }
824
825 if (dump_variables)
826 {
828 if (hide_sensitive)
830 if (one_liner)
833 goto main_ok;
834 }
835
837 {
838 rc = 0;
839 for (; optind < argc; optind++)
843 {
845 if (al)
846 {
847
853 }
854 else
855 {
856 rc = 1;
857 printf(
"%s\n", np->
data);
858 }
859 }
861 goto main_curses;
862 }
863
865 {
867 clear();
871 }
872
873#ifdef USE_AUTOCRYPT
874
875
877 if (c_autocrypt)
879#endif
880
881
884 {
885 struct stat st = { 0 };
887
890 bool skip = false;
891#ifdef USE_IMAP
892
894#endif
895#ifdef USE_POP
897#endif
898#ifdef USE_NNTP
900#endif
901 if (!skip && (stat(
buf_string(fpath), &st) == -1) && (errno == ENOENT))
902 {
903 char msg2[256];
904 snprintf(msg2,
sizeof(msg2),
_(
"%s does not exist. Create it?"), c_folder);
906 {
907 if ((mkdir(
buf_string(fpath), 0700) == -1) && (errno != EEXIST))
908 mutt_error(
_(
"Can't create %s: %s"), c_folder, strerror(errno));
909 }
910 }
912 }
913
914 if (batch_mode)
915 {
916 goto main_ok;
917 }
919
923
925 {
929 rc = 0;
930
931
933 repeat_error = true;
934 goto main_curses;
935 }
936 else if (subject || e || draft_file || include_file ||
938 {
939 FILE *fp_in = NULL;
940 FILE *fp_out = NULL;
941 char *infile = NULL;
942 char *bodytext = NULL;
943 const char *bodyfile = NULL;
944 int rv = 0;
945
948
949 if (!e)
953
954 for (i = optind; i < argc; i++)
955 {
957 {
959 {
962 goto main_curses;
963 }
964 }
965 else
966 {
968 }
969 }
970
974 {
977 goto main_curses;
978 }
979
980 if (subject)
981 {
983 }
984
985 if (draft_file)
986 {
987 infile = draft_file;
988 include_file = NULL;
989 }
990 else if (include_file)
991 {
992 infile = include_file;
993 }
994 else
995 {
996 edit_infile = false;
997 }
998
999 if (infile || bodytext)
1000 {
1001
1002 if (infile)
1003 {
1005 {
1006 if (edit_infile)
1007 {
1010 goto main_curses;
1011 }
1012 fp_in = stdin;
1013 }
1014 else
1015 {
1018 fp_in = fopen(
buf_string(&expanded_infile),
"r");
1019 if (!fp_in)
1020 {
1023 goto main_curses;
1024 }
1025 }
1026 }
1027
1028 if (edit_infile)
1029 {
1030
1031
1033 }
1034 else
1035 {
1036
1037
1038
1040
1042 if (!fp_out)
1043 {
1047 goto main_curses;
1048 }
1049 if (fp_in)
1050 {
1052 if (fp_in != stdin)
1054 }
1055 else if (bodytext)
1056 {
1057 fputs(bodytext, fp_out);
1058 }
1060
1062 if (!fp_in)
1063 {
1066 goto main_curses;
1067 }
1068 }
1069
1070
1071
1072
1073 if (draft_file)
1074 {
1076 struct stat st = { 0 };
1077
1079
1080
1081
1085 if (fstat(fileno(fp_in), &st) != 0)
1086 {
1090 goto main_curses;
1091 }
1093
1095 {
1096 mutt_error(
_(
"Can't parse message template: %s"), draft_file);
1099 goto main_curses;
1100 }
1101
1102
1103 struct ListNode *np = NULL, *tmp = NULL;
1106 {
1108 {
1109 if (c_resume_edited_draft_files)
1111
1115 }
1116 }
1117
1123
1126 }
1127
1128
1129 else if (edit_infile)
1131
1132 else
1134
1136 }
1137
1139
1141 {
1143
1144 while (b && b->
next)
1146
1149 {
1150 if (b)
1151 {
1154 }
1155 else
1156 {
1159 }
1160 if (!b)
1161 {
1165 goto main_curses;
1166 }
1167 }
1169 }
1170
1172
1176
1177 if (edit_infile)
1178 {
1179 if (draft_file)
1180 {
1181 if (truncate(
buf_string(&expanded_infile), 0) == -1)
1182 {
1185 goto main_curses;
1186 }
1188 if (!fp_out)
1189 {
1192 goto main_curses;
1193 }
1194
1195
1196
1197 if (rv < 0)
1198 {
1204 }
1205
1208 c_crypt_protected_headers_read &&
1212 if (c_resume_edited_draft_files)
1213 fprintf(fp_out, "X-Mutt-Resume-Draft: 1\n");
1214 fputc('\n', fp_out);
1216 {
1219 goto main_curses;
1220 }
1222 }
1223
1225 }
1226
1227
1230
1232
1233 if (rv != 0)
1234 goto main_curses;
1235 }
1237 {
1238
1239
1241 goto main_curses;
1242 }
1243 else
1244 {
1246 {
1247#ifdef USE_IMAP
1250#endif
1253 {
1255 goto main_curses;
1256 }
1259#ifdef USE_IMAP
1261#endif
1262 }
1264 {
1265#ifdef USE_NNTP
1267 {
1273 goto main_curses;
1274 }
1275 else
1276#endif
1278 {
1280 goto main_curses;
1281 }
1286 {
1287 goto main_ok;
1288 }
1289 }
1290
1292 {
1294 if (c_spool_file)
1295 {
1296
1298 if (m_desc)
1300 else
1302 }
1303 else if (c_folder)
1304 {
1306 }
1307
1308 }
1309
1310#ifdef USE_NNTP
1312 {
1316 }
1317 else
1318#endif
1320
1323
1325 {
1326
1328 {
1329 case -1:
1331 goto main_curses;
1332 case 1:
1334 goto main_curses;
1335 }
1336 }
1337
1342
1343 repeat_error = true;
1347 {
1350
1353 repeat_error = false;
1354 }
1355 if (m || !explicit_folder)
1356 {
1359
1364
1368 repeat_error = false;
1369 }
1370#ifdef USE_IMAP
1372#endif
1373#ifdef USE_SASL_CYRUS
1375#endif
1376#ifdef USE_SASL_GNU
1378#endif
1379#ifdef USE_AUTOCRYPT
1381#endif
1382
1383
1384 }
1385
1386main_ok:
1387 rc = 0;
1388main_curses:
1391
1394main_exit:
1422 return rc;
1423}
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_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_browser_cleanup(void)
Clean up working Buffers.
void buf_select_file(struct Buffer *file, SelectFileFlags flags, struct Mailbox *m, char ***files, int *numfiles)
Let the user select a file.
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.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
void config_cache_free(void)
Cleanup the cache of charset config variables.
@ MT_COLOR_NORMAL
Plain text.
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.
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.
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 envlist_free(char ***envp)
Free the private copy of the environment.
char ** envlist_init(char **envp)
Create a copy of the environment.
void commands_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
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.
char ** EnvList
Private copy of the environment variables.
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.
@ LL_MESSAGE
Log informational message.
@ LL_NOTIFY
Log of notifications.
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.
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.
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.
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.
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.
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 buf_expand_path(struct Buffer *buf)
Create the canonical path.
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 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 mutt_parse_mailto(struct Envelope *env, char **body, const char *src)
Parse a mailto:// url.
void buf_pool_free(void)
Release the Buffer pool.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the 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 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 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.