all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ken <gebser@speakeasy.net>
Subject: Re: batch mode to send email; bug in "mail"
Date: Tue, 08 Aug 2006 08:21:42 -0400	[thread overview]
Message-ID: <44D881D6.80205@speakeasy.net> (raw)
In-Reply-To: <eb7luk$ffv$1@sea.gmane.org>


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.

  parent reply	other threads:[~2006-08-08 12:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-07  9:23 batch mode to send an email ken
2006-08-07 15:23 ` Kevin Rodgers
2006-08-07 19:07   ` ken
2006-08-07 23:25     ` Kevin Rodgers
2006-08-07 23:51   ` ken
2006-08-08 12:21   ` ken [this message]
2006-08-08 12:37   ` batch mode to send email; bug in "mail" ken
2006-08-08 13:13     ` Nick Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44D881D6.80205@speakeasy.net \
    --to=gebser@speakeasy.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.