From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.devel Subject: Re: batch mode to send email; bug in "mail" Date: Tue, 08 Aug 2006 08:21:42 -0400 Message-ID: <44D881D6.80205@speakeasy.net> References: <44D7069F.7010105@speakeasy.net> Reply-To: gebser@speakeasy.net NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1155062782 22420 80.91.229.2 (8 Aug 2006 18:46:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 Aug 2006 18:46:22 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 08 20:46:18 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GAWaa-00053Y-BQ for ged-emacs-devel@m.gmane.org; Tue, 08 Aug 2006 20:46:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GAWaZ-0005eB-M7 for ged-emacs-devel@m.gmane.org; Tue, 08 Aug 2006 14:46:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GAQbC-0005dm-6x for emacs-devel@gnu.org; Tue, 08 Aug 2006 08:22:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GAQbA-0005b6-KS for emacs-devel@gnu.org; Tue, 08 Aug 2006 08:22:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GAQbA-0005b3-I7 for emacs-devel@gnu.org; Tue, 08 Aug 2006 08:22:16 -0400 Original-Received: from [69.17.117.5] (helo=mail3.sea5.speakeasy.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GAQfc-0008Hq-RC for emacs-devel@gnu.org; Tue, 08 Aug 2006 08:26:53 -0400 Original-Received: (qmail 18652 invoked from network); 8 Aug 2006 12:22:14 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO [192.168.0.27]) (gebser@[66.93.11.17]) (envelope-sender ) by mail3.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 8 Aug 2006 12:22:14 -0000 User-Agent: Thunderbird 1.5.0.5 (X11/20060725) Original-To: emacs-bug In-Reply-To: X-Mailman-Approved-At: Tue, 08 Aug 2006 14:45:50 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58184 Archived-At: 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.