This allows having multiple draft folders or queueing drafts
for automatic sending.
-.RB [ \-verbose " | " \-noverbose ]
+.RB [ \-verbose " | " \-noverbose ]
.RB [ \-Version ]
.RB [ \-help ]
.ad
.RB [ \-Version ]
.RB [ \-help ]
.ad
-argument will send the current message in the draft folder.
+arguments will send the current message in the draft folder.
-always takes messages from the draft folder.
-(But, a
+sends messages from the draft folder, unless
-argument might be added in the future.)
Consult the
.BR mh-draft (7)
man page for more information.
Consult the
.BR mh-draft (7)
man page for more information.
-.RB ` msgs "' defaults to the current message in the draft folder"
+.RB ` msgs "' defaults to the current message"
+.RB ` +folder "' defaults to the draft folder"
int msgnum, status;
int in, out;
int n;
int msgnum, status;
int in, out;
int n;
- char *cp, *maildir = NULL;
+ char *cp, *maildir = NULL, *folder = NULL;
char buf[BUFSIZ], **argp, **arguments;
char *msgs[MAXARGS], *vec[MAXARGS];
char *files[MAXARGS];
char buf[BUFSIZ], **argp, **arguments;
char *msgs[MAXARGS], *vec[MAXARGS];
char *files[MAXARGS];
vec[vecp++] = --cp;
continue;
}
vec[vecp++] = --cp;
continue;
}
+ } else if (*cp == '+' || *cp == '@') {
+ if (folder) {
+ adios(EX_USAGE, NULL, "only one folder at a time!");
+ } else {
+ folder = mh_xstrdup(expandfol(cp));
+ }
} else {
if (*cp == '/') {
files[nfiles++] = cp;
} else {
if (*cp == '/') {
files[nfiles++] = cp;
- maildir = toabsdir(draftfolder);
+ folder = folder ? folder : draftfolder;
+ maildir = toabsdir(folder);
if (chdir(maildir) == NOTOK) {
adios(EX_OSERR, maildir, "unable to change directory to");
}
if (chdir(maildir) == NOTOK) {
adios(EX_OSERR, maildir, "unable to change directory to");
}
- if (!(mp = folder_read(draftfolder))) {
- adios(EX_IOERR, NULL, "unable to read draft folder %s",
- draftfolder);
+ if (!(mp = folder_read(folder))) {
+ adios(EX_IOERR, NULL, "unable to read folder %s",
+ folder);
- adios(EX_DATAERR, NULL, "no messages in draft folder %s",
- draftfolder);
+ adios(EX_DATAERR, NULL, "no messages in folder %s",
+ folder);
}
/* parse all the msgranges/sequences and set SELECTED */
for (msgnum = 0; msgnum < nmsgs; msgnum++) {
}
/* parse all the msgranges/sequences and set SELECTED */
for (msgnum = 0; msgnum < nmsgs; msgnum++) {