unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: batch mode to send an email
       [not found] ` <eb7luk$ffv$1@sea.gmane.org>
@ 2006-08-07 23:51   ` ken
  2006-08-08 12:21   ` batch mode to send email; bug in "mail" ken
  2006-08-08 12:37   ` ken
  2 siblings, 0 replies; 4+ messages in thread
From: ken @ 2006-08-07 23:51 UTC (permalink / raw)



Trying to get emacs to send an email in batch mode.
Using this code:

(setq send-mail-function 'smtpmail-send-it
      smtpmail-smtp-server "mail.server.tld")

(setq mail-default-headers
      "X-RTFM: Sending Mail; Mail Sending; (smtpmail)Emacs Speaks SMTP\n")

(mail nil "someuser@somewhere.somedomain" "my favorite subject")

(insert "Blah, blah, blah.\n")

(mail-send-and-exit)


The error I get is:

Wrong number of arguments: #[(arg)
("/usr/share/emacs/21.3/lisp/mail/sendmail.elc" . 21146) nil 2
("/usr/share/emacs/21.3/lisp/mail/sendmail.elc" . 20985) "P"], 0

(all on one line, of course.  My mail client autowraps.)

I comment out  the line ''(mail nil ....)'' and the error goes away.

"C-h f mail" says there can be more args, but doesn't say it must.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: batch mode to send email; bug in "mail"
       [not found] ` <eb7luk$ffv$1@sea.gmane.org>
  2006-08-07 23:51   ` batch mode to send an email ken
@ 2006-08-08 12:21   ` ken
  2006-08-08 12:37   ` ken
  2 siblings, 0 replies; 4+ messages in thread
From: ken @ 2006-08-08 12:21 UTC (permalink / raw)



Trying to get emacs to send an email in batch mode.
Using this code:

(setq send-mail-function 'smtpmail-send-it
      smtpmail-smtp-server "mail.server.tld")

(setq mail-default-headers
      "X-goal: Trying to send Mail with elisp\n")

(mail nil "someuser@somewhere.somedomain" "my favorite subject")

(insert "Blah, blah, blah.\n")

(mail-send-and-exit)


The error I get is with the third line-- "(mail nil ...)":

Wrong number of arguments: #[(arg)
("/usr/share/emacs/21.3/lisp/mail/sendmail.elc" . 21146) nil 2
("/usr/share/emacs/21.3/lisp/mail/sendmail.elc" . 20985) "P"], 0

(Error is all on one line, of course.  My mail client autowraps.)

I comment out  the line ''(mail nil ....)'' and the error goes away.

"C-h f mail" says there can be more args, but doesn't say it must.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: batch mode to send email; bug in "mail"
       [not found] ` <eb7luk$ffv$1@sea.gmane.org>
  2006-08-07 23:51   ` batch mode to send an email ken
  2006-08-08 12:21   ` batch mode to send email; bug in "mail" ken
@ 2006-08-08 12:37   ` ken
  2006-08-08 13:13     ` Nick Roberts
  2 siblings, 1 reply; 4+ messages in thread
From: ken @ 2006-08-08 12:37 UTC (permalink / raw)



Trying to get emacs to send an email in batch mode.
Using this code:

(setq send-mail-function 'smtpmail-send-it
      smtpmail-smtp-server "mail.server.tld")

(setq mail-default-headers
      "X-goal: Trying to send Mail with elisp\n")

(mail nil "someuser@somewhere.somedomain" "my favorite subject")

(insert "Blah, blah, blah.\n")

(mail-send-and-exit)


The error I get is with the third line-- "(mail nil ...)":

Wrong number of arguments: #[(arg)
("/usr/share/emacs/21.3/lisp/mail/sendmail.elc" . 21146) nil 2
("/usr/share/emacs/21.3/lisp/mail/sendmail.elc" . 20985) "P"], 0

(Error is all on one line, of course.  My mail client autowraps.)

Note that there's no error when I put the point after the line in
question and do "C-x C-e" but only within an .el file executed from bash.

I comment out  the line ''(mail nil ....)'' and the error goes away.

"C-h f mail" says there can be more args, but doesn't say it must.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: batch mode to send email; bug in "mail"
  2006-08-08 12:37   ` ken
@ 2006-08-08 13:13     ` Nick Roberts
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Roberts @ 2006-08-08 13:13 UTC (permalink / raw)
  Cc: emacs-bug

 > The error I get is with the third line-- "(mail nil ...)":
 > 
 > Wrong number of arguments: #[(arg)
 > ("/usr/share/emacs/21.3/lisp/mail/sendmail.elc" . 21146) nil 2
 > ("/usr/share/emacs/21.3/lisp/mail/sendmail.elc" . 20985) "P"], 0

You need to change:

(defun mail-send-and-exit (arg)
...

in sendmail.el to

(defun mail-send-and-exit (&optional arg)
...

This has been done in CVS Emacs.  It would help us if you tested this
version which you can get from Savannah with

 
 cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co emacs

and by following the instructions in the file INSTALL.CVS.

bug-gnu-emacs@gnu.org is the mailing list for reporting bugs for the released
version of Emacs.  You can send to that list using report-emacs-bug (also
on the menu bar under "Help"). It also gives your configuration.


-- 
Nick                                           http://www.inet.net.nz/~nickrob

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-08 13:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <44D7069F.7010105@speakeasy.net>
     [not found] ` <eb7luk$ffv$1@sea.gmane.org>
2006-08-07 23:51   ` batch mode to send an email ken
2006-08-08 12:21   ` batch mode to send email; bug in "mail" ken
2006-08-08 12:37   ` ken
2006-08-08 13:13     ` Nick Roberts

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).