When sending with Sendmail or SMTP we exclude address groups
anyway, so treat these addresses as not present when checking
for valid recipients before sending in the compose menu.
mutt_find_list (orig->env->in_reply_to, reply->env->message_id);
}
+static int has_recips (ADDRESS *a)
+{
+ int c = 0;
+
+ for ( ; a; a = a->next)
+ {
+ if (!a->mailbox || a->group)
+ continue;
+ c++;
+ }
+ return c;
+}
+
int
ci_send_message (int flags, /* send mode */
HEADER *msg, /* template to use for new message */
}
}
- if (!msg->env->to && !msg->env->cc && !msg->env->bcc)
+ if (!has_recips (msg->env->to) && !has_recips (msg->env->cc) &&
+ !has_recips (msg->env->bcc))
{
if (! (flags & SENDBATCH))
{