[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: batch mode to send email; bug in "mail"
From: |
ken |
Subject: |
Re: batch mode to send email; bug in "mail" |
Date: |
Tue, 08 Aug 2006 08:37:39 -0400 |
User-agent: |
Thunderbird 1.5.0.5 (X11/20060725) |
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 "address@hidden" "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.
- Re: batch mode to send email; bug in "mail",
ken <=