#include "keymap.h"
#include "copy.h"
#include "mx.h"
-#include "mutt_crypt.h"
+#include <lib-crypt/crypt.h>
#include "mutt_idna.h"
#include "url.h"
#include "attach.h"
msg->env->newsgroups = m_strdup(((NNTP_DATA *) ctx->data)->group);
#endif
- if (!(flags & SENDMAILX) &&
- !(option (OPTAUTOEDIT) && option (OPTEDITHDRS)) &&
+ if (!(option (OPTAUTOEDIT) && option (OPTEDITHDRS)) &&
!((flags & SENDREPLY) && option (OPTFASTREPLY))) {
if (edit_envelope (msg->env, flags) == -1)
goto cleanup;
process_user_header (msg->env);
- if (option (OPTSIGONTOP)
- && (!(flags & (SENDMAILX | SENDKEY)) && Editor
- && m_strcmp(Editor, "builtin") != 0))
+ if (option (OPTSIGONTOP) && (!(flags & SENDKEY) && Editor))
append_signature (tempfp);
/* include replies/forwarded messages, unless we are given a template */
&& generate_body (tempfp, msg, flags, ctx, cur) == -1)
goto cleanup;
- if (!option (OPTSIGONTOP)
- && (!(flags & (SENDMAILX | SENDKEY)) && Editor
- && m_strcmp(Editor, "builtin") != 0))
+ if (!option (OPTSIGONTOP) && (!(flags & SENDKEY) && Editor))
append_signature (tempfp);
/*
* can take effect.
*/
- if (!(flags & SENDMAILX)) {
- if (option (OPTCRYPTAUTOSIGN))
- msg->security |= SIGN;
- if (option (OPTCRYPTAUTOENCRYPT))
- msg->security |= ENCRYPT;
- if (option (OPTCRYPTREPLYENCRYPT) && cur && (cur->security & ENCRYPT))
- msg->security |= ENCRYPT;
- if (option (OPTCRYPTREPLYSIGN) && cur && (cur->security & SIGN))
- msg->security |= SIGN;
- if (option (OPTCRYPTREPLYSIGNENCRYPTED) && cur
- && (cur->security & ENCRYPT))
- msg->security |= SIGN;
- if (msg->security & (ENCRYPT | SIGN)) {
- if (option (OPTPGPAUTOINLINE))
- msg->security |= INLINE;
- if (option (OPTPGPREPLYINLINE) && cur && (cur->security & INLINE))
- msg->security |= INLINE;
- }
+ if (option (OPTCRYPTAUTOSIGN))
+ msg->security |= SIGN;
+ if (option (OPTCRYPTAUTOENCRYPT))
+ msg->security |= ENCRYPT;
+ if (option (OPTCRYPTREPLYENCRYPT) && cur && (cur->security & ENCRYPT))
+ msg->security |= ENCRYPT;
+ if (option (OPTCRYPTREPLYSIGN) && cur && (cur->security & SIGN))
+ msg->security |= SIGN;
+ if (option (OPTCRYPTREPLYSIGNENCRYPTED) && cur
+ && (cur->security & ENCRYPT))
+ msg->security |= SIGN;
+ if (msg->security & (ENCRYPT | SIGN)) {
+ if (option (OPTPGPAUTOINLINE))
+ msg->security |= INLINE;
+ if (option (OPTPGPREPLYINLINE) && cur && (cur->security & INLINE))
+ msg->security |= INLINE;
}
if (msg->security) {
if (!(flags & SENDKEY))
safe_fclose (&tempfp);
- if (flags & SENDMAILX) {
- if (mutt_builtin_editor (msg->content->filename, msg, cur) == -1)
- goto cleanup;
- }
- else if (!(flags & SENDBATCH)) {
+ if (!(flags & SENDBATCH)) {
struct stat st;
time_t mtime = mutt_decrease_mtime (msg->content->filename, NULL);
if (mutt_needs_mailcap (msg->content)) {
if (!mutt_edit_attachment (msg->content))
goto cleanup;
- } else if (!Editor || m_strcmp("builtin", Editor) == 0)
- mutt_builtin_editor (msg->content->filename, msg, cur);
- else if (option (OPTEDITHDRS)) {
+ } else if (option (OPTEDITHDRS)) {
mutt_env_to_local (msg->env);
mutt_edit_headers (Editor, msg->content->filename, msg, fcc,
sizeof (fcc));
mutt_update_encoding (msg->content);
- if (!(flags & (SENDMAILX | SENDBATCH))) {
+ if (!(flags & SENDBATCH)) {
main_loop:
fcc_error = 0; /* reset value since we may have failed before */
&& (msg->content->parts != clear_content))
free_clear_content = 1;
- if (!option (OPTNOCURSES) && !(flags & SENDMAILX))
+ if (!option (OPTNOCURSES))
mutt_message _("Sending message...");
mutt_prepare_envelope (msg->env, 1);
goto cleanup;
}
}
- else if (!option (OPTNOCURSES) && !(flags & SENDMAILX))
+ else if (!option (OPTNOCURSES))
mutt_message (i != 0 ? _("Sending in background.") :
#ifdef USE_NNTP
(flags & SENDNEWS) ? _("Article posted.") :
- _("Mail sent."));
+ _("Mail sent.")
#else
- _("Mail sent."));
+ _("Mail sent.")
#endif
-
+ );
if (msg->security & ENCRYPT)
p_delete(&pgpkeylist);