Discussion:
confirmation in message mode
(too old to reply)
Art Werschulz
2010-08-10 15:54:53 UTC
Permalink
Hi.

We just upgraded from Fedora 12 to Fedora 13. We're now using
GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.20.1) of
2010-05-13 on x86-01.phx2.fedoraproject.org

This version of emacs uses Message Mode, rather than Mail Mode, for
composing outgoing email. Under the old regime, I used the following
Emacs Lisp code to ask whether I really wanted to send a msg:

------%<--%<--%<---cut here---%<--%<--%<----------------------------

;;; from ***@fore.com (Frank P. Bresz)

(defun my-sendmail-send-it ()
(interactive)
(if (y-or-n-p "Really send? ")
(sendmail-send-it)
(error "Send Aborted")))

(setq send-mail-function 'my-sendmail-send-it)
------%<--%<--%<---cut here---%<--%<--%<----------------------------

Now the info pages say:

The variable `send-mail-function' controls how the default mail user
agent sends mail. Its value should be a function, which can be one of
the following:

`sendmail-send-it'
Send mail using the system's default `sendmail' (or
`sendmail'-compatible) program. This is the default on Unix and
GNU, and works provided the system is a valid "mail host" (that is,
provided it can deliver mail via SMTP).

So I would expect this code to work under Message Mode. But it
doesn't. In other words, I get no confirmation check, and the mail is
simply sent.

Any suggestions on what I'm missing here? Thanks.
--
Art Werschulz (8-{)} "Metaphors be with you." -- bumper sticker
GCS/M (GAT): d? -p+ c++ l++ u+ P++ e--- m* s n+ h f g+ w+ t+ r-
Net: ***@dsm.fordham.edu http://www.dsm.fordham.edu/~agw
Phone: Fordham U. (212) 636-6325, Columbia U. (646) 775-6035
David Biesack
2010-08-11 21:54:32 UTC
Permalink
Art;

Try setting message-send-mail-function instead.
(You should be able to use M-x customize-variable)
The default value is message-send-mail-with-sendmail
Post by Art Werschulz
Hi.
We just upgraded from Fedora 12 to Fedora 13. We're now using
GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.20.1) of
2010-05-13 on x86-01.phx2.fedoraproject.org
This version of emacs uses Message Mode, rather than Mail Mode, for
composing outgoing email. Under the old regime, I used the following
------%<--%<--%<---cut here---%<--%<--%<----------------------------
(defun my-sendmail-send-it ()
(interactive)
(if (y-or-n-p "Really send? ")
(sendmail-send-it)
(error "Send Aborted")))
(setq send-mail-function 'my-sendmail-send-it)
------%<--%<--%<---cut here---%<--%<--%<----------------------------
The variable `send-mail-function' controls how the default mail user
agent sends mail. Its value should be a function, which can be one of
`sendmail-send-it'
Send mail using the system's default `sendmail' (or
`sendmail'-compatible) program. This is the default on Unix and
GNU, and works provided the system is a valid "mail host" (that is,
provided it can deliver mail via SMTP).
So I would expect this code to work under Message Mode. But it
doesn't. In other words, I get no confirmation check, and the mail is
simply sent.
Any suggestions on what I'm missing here? Thanks.
Art Werschulz
2010-08-12 13:33:53 UTC
Permalink
Hi.
Post by David Biesack
Art;
Try setting message-send-mail-function instead.
(You should be able to use M-x customize-variable)
The default value is message-send-mail-with-sendmail
That did it. Thanks!!
--
Art Werschulz (8-{)} "Metaphors be with you." -- bumper sticker
GCS/M (GAT): d? -p+ c++ l++ u+ P++ e--- m* s n+ h f g+ w+ t+ r-
Net: ***@dsm.fordham.edu http://www.dsm.fordham.edu/~agw
Phone: Fordham U. (212) 636-6325, Columbia U. (646) 775-6035
Loading...